Skip to content

Commit e3e30e9

Browse files
committed
SPI_MASTER: Signal DOUT_VLD is generated earlier, editing comments
1 parent 71a6cec commit e3e30e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rtl/spi_master.vhd

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ entity SPI_MASTER is
4949
MOSI : out std_logic;
5050
MISO : in std_logic;
5151
-- USER INTERFACE
52-
DIN : in std_logic_vector(DATA_WIDTH-1 downto 0);
53-
DIN_VLD : in std_logic; -- when DIN_VLD = 1, data on DIN are valid and will be transmit
54-
READY : out std_logic; -- when READY = 1, SPI master is ready to accept data on DIN
55-
DOUT : out std_logic_vector(DATA_WIDTH-1 downto 0);
56-
DOUT_VLD : out std_logic -- when DOUT_VLD = 1, data on DOUT are valid
52+
DIN : in std_logic_vector(DATA_WIDTH-1 downto 0); -- input data
53+
DIN_VLD : in std_logic; -- when DIN_VLD = 1, input data are valid and can be accept
54+
READY : out std_logic; -- when READY = 1, SPI master is ready to accept input data
55+
DOUT : out std_logic_vector(DATA_WIDTH-1 downto 0); -- output data
56+
DOUT_VLD : out std_logic -- when DOUT_VLD = 1, output data are valid
5757
);
5858
end SPI_MASTER;
5959

@@ -98,7 +98,7 @@ begin
9898
spi_mosi_reg_en <= spi_clk_falling_edge_en1;
9999
spi_bit_cnt_en <= spi_clk_falling_edge_en1 AND NOT spi_chip_select_n;
100100
spi_clk_en_set <= spi_clk_falling_edge_en0;
101-
spi_dout_vld <= spi_clk_falling_edge_en0 AND spi_last_bit;
101+
spi_dout_vld <= spi_clk_rising_edge_en1 AND spi_last_bit;
102102

103103
SCLK <= spi_clk_reg1;
104104
CS_N <= spi_chip_select_n;

0 commit comments

Comments
 (0)