)
]
- self.comb +=[
- set_clk.eq(i==div//2-1),
- clr_clk.eq(i==div-1)
+ self.comb += [
+ set_clk.eq(i == (div//2-1)),
+ clr_clk.eq(i == (div-1))
]
# fsm
#define command_prd(X) command_p{rdphase}(X)
#define command_pwr(X) command_p{wrphase}(X)
""".format(rdphase=str(sdram_phy_settings.rdphase), wrphase=str(sdram_phy_settings.wrphase))
- r +="\n"
+ r += "\n"
#
# sdrrd/sdrwr functions utilities
{sdram_dfii_pix_rddata_addr}
}};
""".format(n=nphases, sdram_dfii_pix_rddata_addr=",\n\t".join(sdram_dfii_pix_rddata_addr))
- r +="\n"
+ r += "\n"
# init sequence
cmds = {
# register dfi cmds on half_rate clk
r_dfi = Array(Record(phase_cmd_description(addressbits, bankbits)) for i in range(nphases))
for n, phase in enumerate(self.dfi.phases):
- sd_sdram_half +=[
+ sd_sdram_half += [
r_dfi[n].address.eq(phase.address),
r_dfi[n].bank.eq(phase.bank),
r_dfi[n].cs_n.eq(phase.cs_n),
dfi_databits_divisor = 1 if phy.settings.memtype == "SDR" else 2
sdram_width = phy.settings.dfi_databits//dfi_databits_divisor
- main_ram_size = 2**(phy.module.geom_settings.bankbits+
- phy.module.geom_settings.rowbits+
+ main_ram_size = 2**(phy.module.geom_settings.bankbits +
+ phy.module.geom_settings.rowbits +
phy.module.geom_settings.colbits)*sdram_width//8
# XXX: Limit main_ram_size to 256MB, we should modify mem_map to allow larger memories.
main_ram_size = min(main_ram_size, 256*1024*1024)