Skip to content

Commit

Permalink
SPI_MASTER: Signal DOUT_VLD is generated earlier, editing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubcabal committed Jul 16, 2016
1 parent 71a6cec commit e3e30e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rtl/spi_master.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ entity SPI_MASTER is
MOSI : out std_logic;
MISO : in std_logic;
-- USER INTERFACE
DIN : in std_logic_vector(DATA_WIDTH-1 downto 0);
DIN_VLD : in std_logic; -- when DIN_VLD = 1, data on DIN are valid and will be transmit
READY : out std_logic; -- when READY = 1, SPI master is ready to accept data on DIN
DOUT : out std_logic_vector(DATA_WIDTH-1 downto 0);
DOUT_VLD : out std_logic -- when DOUT_VLD = 1, data on DOUT are valid
DIN : in std_logic_vector(DATA_WIDTH-1 downto 0); -- input data
DIN_VLD : in std_logic; -- when DIN_VLD = 1, input data are valid and can be accept
READY : out std_logic; -- when READY = 1, SPI master is ready to accept input data
DOUT : out std_logic_vector(DATA_WIDTH-1 downto 0); -- output data
DOUT_VLD : out std_logic -- when DOUT_VLD = 1, output data are valid
);
end SPI_MASTER;

Expand Down Expand Up @@ -98,7 +98,7 @@ begin
spi_mosi_reg_en <= spi_clk_falling_edge_en1;
spi_bit_cnt_en <= spi_clk_falling_edge_en1 AND NOT spi_chip_select_n;
spi_clk_en_set <= spi_clk_falling_edge_en0;
spi_dout_vld <= spi_clk_falling_edge_en0 AND spi_last_bit;
spi_dout_vld <= spi_clk_rising_edge_en1 AND spi_last_bit;

SCLK <= spi_clk_reg1;
CS_N <= spi_chip_select_n;
Expand Down

0 comments on commit e3e30e9

Please sign in to comment.