First working switches testbench
This commit is contained in:
@@ -7,7 +7,7 @@ use work.lt16x32_global.all;
|
||||
use work.wishbone.all;
|
||||
use work.config.all;
|
||||
|
||||
entity wb_led is
|
||||
entity wb_switches is
|
||||
generic(
|
||||
memaddr : generic_addr_type; --:= CFG_BADR_LED;
|
||||
addrmask : generic_mask_type --:= CFG_MADR_LED;
|
||||
@@ -19,11 +19,11 @@ entity wb_led is
|
||||
wslvo : out wb_slv_out_type;
|
||||
|
||||
buttons : in std_logic_vector(4 downto 0);
|
||||
switches : in std_logic_vector(15 downto 0);
|
||||
switches : in std_logic_vector(15 downto 0)
|
||||
);
|
||||
end wb_led;
|
||||
end wb_switches;
|
||||
|
||||
architecture Behavioral of wb_led is
|
||||
architecture Behavioral of wb_switches is
|
||||
|
||||
signal data : std_logic_vector(20 downto 0);
|
||||
signal ack : std_logic;
|
||||
@@ -35,7 +35,7 @@ begin
|
||||
if clk'event and clk='1' then
|
||||
if rst = '1' then
|
||||
ack <= '0';
|
||||
data <= x"0F";
|
||||
data <= (others=>'0');
|
||||
else
|
||||
if wslvi.stb = '1' and wslvi.cyc = '1' then
|
||||
data(15 downto 0) <= switches;
|
||||
|
||||
Reference in New Issue
Block a user