Make switches module ready for real board
This commit is contained in:
@@ -21,7 +21,8 @@ timer_status_addr: .word 0x000F000C
|
|||||||
dmem_start_addr: .word 0x00000400
|
dmem_start_addr: .word 0x00000400
|
||||||
dmem_end_addr: .word 0x000004FC
|
dmem_end_addr: .word 0x000004FC
|
||||||
priority_mask: .word 0xFFFFFF03
|
priority_mask: .word 0xFFFFFF03
|
||||||
timer_target_value: .word 127 // change for simulation / real board
|
// timer_target_value: .word 127 // for simulation
|
||||||
|
timer_target_value: .word 65536 // for real board
|
||||||
|
|
||||||
main:
|
main:
|
||||||
// Initialize stack pointer to the end of the data memory
|
// Initialize stack pointer to the end of the data memory
|
||||||
|
|||||||
@@ -38,8 +38,10 @@ begin
|
|||||||
data <= (others=>'0');
|
data <= (others=>'0');
|
||||||
else
|
else
|
||||||
if wslvi.stb = '1' and wslvi.cyc = '1' then
|
if wslvi.stb = '1' and wslvi.cyc = '1' then
|
||||||
|
if wslvi.we='0' then
|
||||||
data(15 downto 0) <= switches;
|
data(15 downto 0) <= switches;
|
||||||
data(20 downto 16) <= buttons;
|
data(20 downto 16) <= buttons;
|
||||||
|
end if;
|
||||||
|
|
||||||
if ack = '0' then
|
if ack = '0' then
|
||||||
ack <= '1';
|
ack <= '1';
|
||||||
|
|||||||
@@ -57,15 +57,25 @@ BEGIN
|
|||||||
switches <= "1001000101010111";
|
switches <= "1001000101010111";
|
||||||
wait for CLK_PERIOD;
|
wait for CLK_PERIOD;
|
||||||
|
|
||||||
data <= (others => '0');
|
|
||||||
generate_sync_wb_single_read(slvi,slvo,clk,data);
|
generate_sync_wb_single_read(slvi,slvo,clk,data);
|
||||||
|
|
||||||
wait for 2 ns;
|
wait for 2 ns;
|
||||||
|
|
||||||
data <= (others => '0');
|
|
||||||
generate_sync_wb_single_read(slvi,slvo,clk,data);
|
generate_sync_wb_single_read(slvi,slvo,clk,data);
|
||||||
|
|
||||||
wait;
|
buttons <= "11011";
|
||||||
|
switches <= x"DEAD";
|
||||||
|
wait for 10 ns;
|
||||||
|
|
||||||
|
generate_sync_wb_single_read(slvi,slvo,clk,data, SIZE => "00"); -- Single byte
|
||||||
|
|
||||||
|
wait for 10 ns;
|
||||||
|
|
||||||
|
generate_sync_wb_single_read(slvi,slvo,clk,data, SIZE => "01"); -- Half word
|
||||||
|
|
||||||
|
wait for 100 ns;
|
||||||
|
|
||||||
|
assert false report "Simulation terminated!" severity failure;
|
||||||
end process stimuli;
|
end process stimuli;
|
||||||
|
|
||||||
END ARCHITECTURE;
|
END ARCHITECTURE;
|
||||||
|
|||||||
Reference in New Issue
Block a user