Comments (7)
Can you describe what you have in mind?
from misoc.
One problem is the margin
parameter to the ns
function depends on the ratio of the PHY. With the current architecture it is not possible to use ns
correctly. The ns
function also only supports 1:1 and 1:2 system:command ratios at the moment.
Another (minor) problem is the data structures (dictionaries vs. NamedTuples) are different between the module system and the SDRAM controllers. A single type of data structure should be used consistently.
from misoc.
I'm going to look at the margin
parameter in a few hours.
For the second point, is it better like this:
class SDRAMModule:
def __init__(self, clk_freq, memtype):
self.clk_freq = clk_freq
self.memtype = memtype
self.geom_settings = GeomSettings(
bankbits=log2_int(self.nbanks),
rowbits=log2_int(self.nrows),
colbits=log2_int(self.ncols),
)
self.timing_settings = TimingSettings(
tRP=self.ns(self.tRP),
tRCD=self.ns(self.tRCD),
tWR=self.ns(self.tWR),
tWTR=self.tWTR,
tREFI=self.ns(self.tREFI, False),
tRFC=self.ns(self.tRFC)
)
# SDR
class IS42S16160(SDRAMModule):
# geom
nbanks = 4
nrows = 8192
ncols = 512
# timing
tRP = 20
tWR = 20
tRCD = 20
tWR = 20
tWTR = 2
tREFI = 64*1000*1000/8192
tRFC = 70
def __init__(self, clk_freq):
SDRAMModule.__init__(self, clk_freq, "SDR")
from misoc.
Why does memtype require special treatment and overloading of __init__
?
from misoc.
OK, fine with that?:
class SDRAMModule:
def __init__(self, clk_freq):
self.clk_freq = clk_freq
self.geom_settings = GeomSettings(
bankbits=log2_int(self.nbanks),
rowbits=log2_int(self.nrows),
colbits=log2_int(self.ncols),
)
self.timing_settings = TimingSettings(
tRP=self.ns(self.tRP),
tRCD=self.ns(self.tRCD),
tWR=self.ns(self.tWR),
tWTR=self.tWTR,
tREFI=self.ns(self.tREFI, False),
tRFC=self.ns(self.tRFC)
)
# SDR
class IS42S16160(SDRAMModule):
memtype = "SDR"
# geom
nbanks = 4
nrows = 8192
ncols = 512
# timing
tRP = 20
tWR = 20
tRCD = 20
tWR = 20
tWTR = 2
tREFI = 64*1000*1000/8192
tRFC = 70
def __init__(self, clk_freq):
SDRAMModule.__init__(self, clk_freq)
from misoc.
You can remove the IS42S16160.__init__
then. And if you want to keep this architecture, SDRAMModule.__init__
will probably need another parameter that gives information about the PHY (1:1, half rate, quarter rate) so that the ns
function can apply the appropriate compensation. Otherwise ok.
from misoc.
fixed with ed0e451 and 452cbc3.
from misoc.
Related Issues (20)
- Wrong version in `setup.py`
- different clocking of differentiator and integrator HOT 3
- misoc@2022-04-07 fail with either latest migen built from source (2022-09-02) and with migen 0.9.2 HOT 1
- pip install of tag 0.12 fails HOT 5
- fix liteeth error counter atomicity problem HOT 2
- liteeth: remove dw parameterization HOT 2
- liteeth: rename dv to rx_dv
- liteeth: remove MII clock output
- clean up memory regions, names, offsets
- kasli/spi_flash: investigate and implement quad i/o read
- DDR3-related error in Vivado timing report for Ultrascale HOT 1
- spi: first half-cycle (setup period) of a chained, pure read uses the write divider instead of the read divider
- Record.connect return value not used HOT 3
- Binutils compilation
- Standard 1 bit SPI mode for spi_flash not available? HOT 2
- software not rebuilt after gateware change
- fix or remove Ultrascale SDRAM init HOT 4
- Wanted to Build a small SoC HOT 1
- CSRStorage with write_from_dev=True seems broken in simulation HOT 3
- register_rom weirdness HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from misoc.