Add back in DM signals for proper byte accesses

This commit is contained in:
Byron Lathi
2022-12-22 23:26:01 -05:00
parent e08e839d01
commit 6361f39e0b
3 changed files with 1919 additions and 2693 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -158,8 +158,8 @@ always_comb begin
// dm is not needed for reads? // dm is not needed for reads?
if (w_rd_ack) next_state = READ_WAIT; if (w_rd_ack) next_state = READ_WAIT;
end else begin //write end else begin //write
//w_data_i = i_data << (8*i_addr[1:0]); w_data_i = i_data << (8*i_addr[1:0]);
w_data_i = {4{i_data}}; //does anything get through? //w_data_i = {4{i_data}}; //does anything get through?
w_dm = ~(4'b1 << i_addr[1:0]); w_dm = ~(4'b1 << i_addr[1:0]);
if (~i_cpuclk) begin if (~i_cpuclk) begin
w_write = '1; w_write = '1;
@@ -233,7 +233,7 @@ sdram_controller u_sdram_controller(
.i_last(w_last), //Set to high to indicate the last transfer of a burst write or read. .i_last(w_last), //Set to high to indicate the last transfer of a burst write or read.
.i_addr(addr_mux_out), //SDRAM physical address B R C. For half rate, only even addresses. .i_addr(addr_mux_out), //SDRAM physical address B R C. For half rate, only even addresses.
.i_din(r_write_data), //Data to write to SDRAM. Twice normal width when running at half speed (hence the even addresses) .i_din(r_write_data), //Data to write to SDRAM. Twice normal width when running at half speed (hence the even addresses)
.i_dm('0), //dm (r_dm) .i_dm(r_dm), //dm (r_dm)
.o_dout(w_data_o), //Data read from SDRAM, doubled as above. .o_dout(w_data_o), //Data read from SDRAM, doubled as above.
.o_sdr_init_done(o_sdr_init_done), //Indicates that the SDRAM initialization is done. .o_sdr_init_done(o_sdr_init_done), //Indicates that the SDRAM initialization is done.
.o_wr_ack(w_wr_ack), //Write acknowledge, handshake with we .o_wr_ack(w_wr_ack), //Write acknowledge, handshake with we

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<efx:project name="super6502" description="" last_change_date="Thu December 22 2022 20:51:06" location="/home/byron/Projects/super6502/hw/efinix_fpga" sw_version="2022.1.226" last_run_state="pass" last_run_tool="efx_pgm" last_run_flow="bitstream" config_result_in_sync="true" design_ood="sync" place_ood="sync" route_ood="sync" xmlns:efx="http://www.efinixinc.com/enf_proj" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.efinixinc.com/enf_proj enf_proj.xsd"> <efx:project name="super6502" description="" last_change_date="Thu December 22 2022 23:12:58" location="/home/byron/Projects/super6502/hw/efinix_fpga" sw_version="2022.1.226" last_run_state="pass" last_run_tool="efx_pgm" last_run_flow="bitstream" config_result_in_sync="true" design_ood="sync" place_ood="sync" route_ood="sync" xmlns:efx="http://www.efinixinc.com/enf_proj" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.efinixinc.com/enf_proj enf_proj.xsd">
<efx:device_info> <efx:device_info>
<efx:family name="Trion"/> <efx:family name="Trion"/>
<efx:device name="T20F256"/> <efx:device name="T20F256"/>