- fixed byte order on sub-word writes
git-svn-id: http://moon:8086/svn/vhdl/trunk@1269 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -96,6 +96,8 @@ architecture struct of sdram_ctrl_frontend_wb16 is
|
|||||||
|
|
||||||
signal write_fifo_data_avail : std_logic;
|
signal write_fifo_data_avail : std_logic;
|
||||||
signal read_fifo_rdy : std_logic;
|
signal read_fifo_rdy : std_logic;
|
||||||
|
signal write_piso_data_dout : unsigned(PART_DATA_WIDTH-1 downto 0);
|
||||||
|
signal write_piso_dm_dout : unsigned(PART_DM_WIDTH-1 downto 0);
|
||||||
|
|
||||||
alias cmd_fifo_in is cat_fifo_din(CAT_FIFO_WIDTH-1 downto CAT_FIFO_WIDTH-user_cmd_t'length);
|
alias cmd_fifo_in is cat_fifo_din(CAT_FIFO_WIDTH-1 downto CAT_FIFO_WIDTH-user_cmd_t'length);
|
||||||
alias tag_fifo_in is cat_fifo_din(CAT_FIFO_WIDTH-user_cmd_t'length-1 downto CAT_FIFO_WIDTH-user_cmd_t'length-user_tag_t'length);
|
alias tag_fifo_in is cat_fifo_din(CAT_FIFO_WIDTH-user_cmd_t'length-1 downto CAT_FIFO_WIDTH-user_cmd_t'length-user_tag_t'length);
|
||||||
@@ -175,7 +177,7 @@ begin
|
|||||||
din => write_fifo_data_out,
|
din => write_fifo_data_out,
|
||||||
dout_vld => open,
|
dout_vld => open,
|
||||||
shift_en => phy_out.wr_data_re,
|
shift_en => phy_out.wr_data_re,
|
||||||
dout => phy_in.wr_data
|
dout => write_piso_data_dout
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -195,7 +197,7 @@ begin
|
|||||||
din => write_fifo_dm_out,
|
din => write_fifo_dm_out,
|
||||||
dout_vld => open,
|
dout_vld => open,
|
||||||
shift_en => phy_out.wr_data_re,
|
shift_en => phy_out.wr_data_re,
|
||||||
dout => phy_in.wr_dm
|
dout => write_piso_dm_dout
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -282,7 +284,7 @@ begin
|
|||||||
cat_fifo_we <= STB_I and rdy;
|
cat_fifo_we <= STB_I and rdy;
|
||||||
cmd_fifo_in <= UCMD_WRITE when WE_I = '1' else UCMD_READ;
|
cmd_fifo_in <= UCMD_WRITE when WE_I = '1' else UCMD_READ;
|
||||||
addr_fifo_in <= "00" & ADDR_I(22 downto 1);
|
addr_fifo_in <= "00" & ADDR_I(22 downto 1);
|
||||||
tag_fifo_in <= "000" & ADDR_I(2);
|
tag_fifo_in <= "000" & ADDR_I(0);
|
||||||
|
|
||||||
cat_fifo_re <= u_cmd_we and (not u_busy);
|
cat_fifo_re <= u_cmd_we and (not u_busy);
|
||||||
u_cmd_we <= (not cat_fifo_empty);
|
u_cmd_we <= (not cat_fifo_empty);
|
||||||
@@ -291,6 +293,9 @@ begin
|
|||||||
u_tag_in <= tag_fifo_out;
|
u_tag_in <= tag_fifo_out;
|
||||||
-- phy_in.wr_dm <= write_fifo_dm_out;
|
-- phy_in.wr_dm <= write_fifo_dm_out;
|
||||||
-- phy_in.wr_data <= write_fifo_data_out;
|
-- phy_in.wr_data <= write_fifo_data_out;
|
||||||
|
phy_in.wr_data <= write_piso_data_dout when phy_out.tag_wr(0) = '0' else (write_piso_data_dout(PART_DATA_WIDTH/2-1 downto 0) & write_piso_data_dout(PART_DATA_WIDTH-1 downto PART_DATA_WIDTH/2));
|
||||||
|
phy_in.wr_dm <= write_piso_dm_dout when phy_out.tag_wr(0) = '0' else (write_piso_dm_dout(PART_DM_WIDTH/2-1 downto 0) & write_piso_dm_dout(PART_DM_WIDTH-1 downto PART_DM_WIDTH/2));
|
||||||
|
|
||||||
-- write_fifo_re <= phy_out.wr_data_re and (not write_fifo_empty);
|
-- write_fifo_re <= phy_out.wr_data_re and (not write_fifo_empty);
|
||||||
read_fifo_re <= (not read_fifo_empty) and MRDY_I;
|
read_fifo_re <= (not read_fifo_empty) and MRDY_I;
|
||||||
-- read_fifo_we <= phy_out.rd_data_we;
|
-- read_fifo_we <= phy_out.rd_data_we;
|
||||||
|
|||||||
Reference in New Issue
Block a user