New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
saturn: adding platform and base target #381
Conversation
FelixVi
commented
Dec 9, 2017
•
edited
edited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor formatting fixes + removing the currently non-working spiflash.
@@ -0,0 +1,148 @@ | |||
from litex.build.generic_platform import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an header line which mentions where this part comes from? See the example here -> https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/platforms/atlys.py#L1
targets/saturn/base.py
Outdated
f = Fraction(50, 5) | ||
n, d = f.numerator, f.denominator | ||
|
||
print("fvco (MHz) = {0}".format(f0*n/d/1000000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the print statements?
targets/saturn/base.py
Outdated
|
||
# PLL signals | ||
pll_lckd = Signal() | ||
pll_fb = Signal() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you wrap the PLL code like this -> https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/targets/atlys/base.py#L53-L100
targets/saturn/base.py
Outdated
self.clk4x_wr_strb = Signal() | ||
self.clk4x_rd_strb = Signal() | ||
|
||
# sdram_full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
targets/saturn/base.py
Outdated
self.specials += Instance("BUFG", i_I=unbuf_sdram_half_a, o_O=self.cd_sdram_half.clk) | ||
clk_sdram_half_shifted = Signal() | ||
self.specials += Instance("BUFG", i_I=unbuf_sdram_half_b, o_O=clk_sdram_half_shifted) | ||
clk = platform.request("ddram_clock") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
targets/saturn/base.py
Outdated
mem_map = { | ||
"spiflash": 0x20000000, # (default shadow @0xa0000000) | ||
} | ||
mem_map.update(SoCSDRAM.mem_map) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you leave the spiflash out for now?
targets/saturn/base.py
Outdated
|
||
# sdram | ||
sdram_module = MT46H32M16(self.clk_freq, "1:2") | ||
self.submodules.ddrphy = s6ddrphy.S6HalfRateDDRPHY(platform.request("ddram"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapping again.
targets/saturn/base.py
Outdated
self.flash_boot_address = self.mem_map["spiflash"]+platform.gateware_size+bios_size | ||
|
||
SoC = BaseSoC | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra newline at EOF.
platforms/saturn.py
Outdated
from litex.build.generic_platform import * | ||
from litex.build.xilinx import XilinxPlatform | ||
|
||
#this is for the LX45 version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you added FIXME:
here.
platforms/saturn.py
Outdated
IOStandard("LVTTL") | ||
), | ||
|
||
("usb_fifo", 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What type of USB FIFO is on this board?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the FT2232H - one channel for JTAG, the other as FIFO
Should there be a note in the platform file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be good!
Can you please add a description in your commit message? This string from platforms/saturn.py would be a good starting point:
|
Support for the Numato Saturn (LX45 version) (http://numato.com/product/saturn-spartan-6-fpga-development-board-with-ddr-sdram) Board comes with DDR SDRAM, USB-FIFO and lots of GPIO on 100mil headers max frequency can be further optimized