// else if (buf_wr || buf_rd) buf_raddr <= buf_raddr +1; // Separate read/write address? read address re-registered @ negedge //SuppressThisWarning ISExst Result of 10-bit expression is truncated to fit in 9-bit target.
// else if (buf_wr || buf_rd) buf_raddr <= buf_raddr +1; // Separate read/write address? read address re-registered @ negedge //SuppressThisWarning ISExst Result of 10-bit expression is truncated to fit in 9-bit target.
if(rst)run_chn_d<=0;
if(mrst)run_chn_d<=0;
elseif(run_seq)run_chn_d<=run_chn;
elseif(run_seq)run_chn_d<=run_chn;
if(rst)run_refresh_d<=0;
if(mrst)run_refresh_d<=0;
elseif(run_seq)run_refresh_d<=run_refresh;
elseif(run_seq)run_refresh_d<=run_refresh;
if(rst)run_seq_d<=0;
if(mrst)run_seq_d<=0;
elserun_seq_d<=run_seq;
elserun_seq_d<=run_seq;
if(rst)buf_raddr_reset<=0;
if(mrst)buf_raddr_reset<=0;
elsebuf_raddr_reset<=buf_rst&~mem_read_mode;
elsebuf_raddr_reset<=buf_rst&~mem_read_mode;
if(rst)buf_addr_reset<=0;
if(mrst)buf_addr_reset<=0;
elsebuf_addr_reset<=buf_rst;
elsebuf_addr_reset<=buf_rst;
end
end
always@(posedgemclk)begin
always@(posedgemclk)begin
...
@@ -505,32 +510,32 @@ module mcontr_sequencer #(
...
@@ -505,32 +510,32 @@ module mcontr_sequencer #(
ram_1kx32_1kx32#(
ram_1kx32_1kx32#(
.REGISTERS(1)// (0) // register output
.REGISTERS(1)// (0) // register output
)cmd0_buf_i(
)cmd0_buf_i(
.rclk(mclk),// input
.rclk(mclk),// input
.raddr(cmd_addr),// input[9:0]
.raddr(cmd_addr),// input[9:0]
.ren(ren0),// input TODO: verify cmd_busy[0] is correct (was cmd_busy )
.ren(ren0),// input TODO: verify cmd_busy[0] is correct (was cmd_busy ). TODO: make cleaner ren/regen
.regen(ren0),// input
.regen(ren0),// input
.data_out(phy_cmd0_word),// output[31:0]
.data_out(phy_cmd0_word),// output[31:0]
.wclk(cmd0_clk),// input
.wclk(cmd0_clk),// input
.waddr(cmd0_addr),// input[9:0]
.waddr(cmd0_addr),// input[9:0]
.we(cmd0_we),// input
.we(cmd0_we),// input
.web(4'hf),// input[3:0]
.web(4'hf),// input[3:0]
.data_in(cmd0_data)// input[31:0]
.data_in(cmd0_data)// input[31:0]
);
);
// Command sequence memory 0 ("manual"):
// Command sequence memory 0 ("manual"):
ram_1kx32_1kx32#(
ram_1kx32_1kx32#(
.REGISTERS(1)// (0) // register output
.REGISTERS(1)// (0) // register output
)cmd1_buf_i(
)cmd1_buf_i(
.rclk(mclk),// input
.rclk(mclk),// input
.raddr(cmd_addr),// input[9:0]
.raddr(cmd_addr),// input[9:0]
.ren(ren1),// input
.ren(ren1),// input ??? TODO: make cleaner ren/regen
.regen(ren1),// input
.regen(ren1),// input ???
.data_out(phy_cmd1_word),// output[31:0]
.data_out(phy_cmd1_word),// output[31:0]
.wclk(cmd1_clk),// input
.wclk(cmd1_clk),// input
.waddr(cmd1_addr),// input[9:0]
.waddr(cmd1_addr),// input[9:0]
.we(cmd1_we),// input
.we(cmd1_we),// input
.web(4'hf),// input[3:0]
.web(4'hf),// input[3:0]
.data_in(cmd1_data)// input[31:0]
.data_in(cmd1_data)// input[31:0]
);
);
phy_cmd#(
phy_cmd#(
...
@@ -549,7 +554,7 @@ module mcontr_sequencer #(
...
@@ -549,7 +554,7 @@ module mcontr_sequencer #(
.CLKFBOUT_DIV_REF(CLKFBOUT_DIV_REF),
.CLKFBOUT_DIV_REF(CLKFBOUT_DIV_REF),
.DIVCLK_DIVIDE(DIVCLK_DIVIDE),
.DIVCLK_DIVIDE(DIVCLK_DIVIDE),
.CLKFBOUT_PHASE(CLKFBOUT_PHASE),
.CLKFBOUT_PHASE(CLKFBOUT_PHASE),
.SDCLK_PHASE(SDCLK_PHASE),/// debugging
.SDCLK_PHASE(SDCLK_PHASE),/// debugging
.CLK_PHASE(CLK_PHASE),
.CLK_PHASE(CLK_PHASE),
.CLK_DIV_PHASE(CLK_DIV_PHASE),
.CLK_DIV_PHASE(CLK_DIV_PHASE),
...
@@ -560,67 +565,68 @@ module mcontr_sequencer #(
...
@@ -560,67 +565,68 @@ module mcontr_sequencer #(
.SS_MOD_PERIOD(SS_MOD_PERIOD),
.SS_MOD_PERIOD(SS_MOD_PERIOD),
.CMD_PAUSE_BITS(CMD_PAUSE_BITS),// numer of (address) bits to encode pause
.CMD_PAUSE_BITS(CMD_PAUSE_BITS),// numer of (address) bits to encode pause
.CMD_DONE_BIT(CMD_DONE_BIT)// bit number (address) to signal sequence done
.CMD_DONE_BIT(CMD_DONE_BIT)// bit number (address) to signal sequence done
)phy_cmd_i(
)phy_cmd_i(
.SDRST(SDRST),// output
.SDRST(SDRST),// output
.SDCLK(SDCLK),// output
.SDCLK(SDCLK),// output
.SDNCLK(SDNCLK),// output
.SDNCLK(SDNCLK),// output
.SDA(SDA[ADDRESS_NUMBER-1:0]),// output[14:0]
.SDA(SDA[ADDRESS_NUMBER-1:0]),// output[14:0]
.SDBA(SDBA[2:0]),// output[2:0]
.SDBA(SDBA[2:0]),// output[2:0]
.SDWE(SDWE),// output
.SDWE(SDWE),// output
.SDRAS(SDRAS),// output
.SDRAS(SDRAS),// output
.SDCAS(SDCAS),// output
.SDCAS(SDCAS),// output
.SDCKE(SDCKE),// output
.SDCKE(SDCKE),// output
.SDODT(SDODT),// output
.SDODT(SDODT),// output
.SDD(SDD[15:0]),// inout[15:0]
.SDD(SDD[15:0]),// inout[15:0]
.SDDML(SDDML),// inout
.SDDML(SDDML),// inout
.DQSL(DQSL),// inout
.DQSL(DQSL),// inout
.NDQSL(NDQSL),// inout
.NDQSL(NDQSL),// inout
.SDDMU(SDDMU),// inout
.SDDMU(SDDMU),// inout
.DQSU(DQSU),// inout
.DQSU(DQSU),// inout
.NDQSU(NDQSU),// inout
.NDQSU(NDQSU),// inout
.clk_in(clk_in),// input
.clk_in(clk_in),// input
.rst_in(rst_in),// input
.rst_in(rst_in),// input
.mclk(mclk),// output
.mclk(mclk),// output
.ref_clk(ref_clk),// output
.mrst(mrst),// input
.dly_data(dly_data[7:0]),// input[7:0]
.ref_clk(ref_clk),// output
.dly_addr(dly_addr[6:0]),// input[6:0]
.idelay_ctrl_reset(idelay_ctrl_reset),// output
.ld_delay(ld_delay),// input
.dly_data(dly_data[7:0]),// input[7:0]
.set(set),// input
.dly_addr(dly_addr[6:0]),// input[6:0]
.ld_delay(ld_delay),// input
.set(set),// input
// .locked (locked), // output
// .locked (locked), // output
.locked_mmcm(locked_mmcm),// output
.locked_mmcm(locked_mmcm),// output
.locked_pll(locked_pll),// output
.locked_pll(locked_pll),// output
.dly_ready(dly_ready),// output
.dly_ready(dly_ready),// output
.dci_ready(dci_ready),// output
.dci_ready(dci_ready),// output
.phy_locked_mmcm(phy_locked_mmcm),// output
.phy_locked_mmcm(phy_locked_mmcm),// output
.phy_locked_pll(phy_locked_pll),// output
.phy_locked_pll(phy_locked_pll),// output
.phy_dly_ready(phy_dly_ready),// output
.phy_dly_ready(phy_dly_ready),// output
.phy_dci_ready(phy_dci_ready),// output
.phy_dci_ready(phy_dci_ready),// output
.tmp_debug(tmp_debug_a[7:0]),
.tmp_debug(tmp_debug_a[7:0]),
.ps_rdy(ps_rdy),// output
.ps_rdy(ps_rdy),// output
.ps_out(ps_out[7:0]),// output[7:0]
.ps_out(ps_out[7:0]),// output[7:0]
.phy_cmd_word(phy_cmd_word[31:0]),// input[31:0]
.phy_cmd_word(phy_cmd_word[31:0]),// input[31:0]
.phy_cmd_nop(phy_cmd_nop),// output
.phy_cmd_nop(phy_cmd_nop),// output
.phy_cmd_add_pause(phy_cmd_add_pause),// one pause cycle (for 8-bursts)
.phy_cmd_add_pause(phy_cmd_add_pause),// one pause cycle (for 8-bursts)
)cmd_mux_i(// SuppressThisWarning ISExst: Output port <par_data>,<par_waddr>, <cseq_ackn> of the instance <cmd_mux_i> is unconnected or connected to loadless signal.
)cmd_mux_i(// SuppressThisWarning ISExst: Output port <par_data>,<par_waddr>, <cseq_ackn> of the instance <cmd_mux_i> is unconnected or connected to loadless signal.
)axibram_write_i(//SuppressThisWarning ISExst Output port <bram_wstb> of the instance <axibram_write_i> is unconnected or connected to loadless signal.
)axibram_write_i(//SuppressThisWarning ISExst Output port <bram_wstb> of the instance <axibram_write_i> is unconnected or connected to loadless signal.