This commit is contained in:
Adrien Bourmault 2022-01-21 00:17:41 +01:00
parent 5375e88722
commit 21e157377d
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
1 changed files with 32 additions and 2 deletions

View File

@ -112,6 +112,9 @@ begin
ck <= not ck after 2 ns;
process
signal vexe_res : std_logic_vector(31 downto 0);
begin
-- add
ck <= '0';
@ -155,6 +158,9 @@ begin
ck <= '1';
wait;
vexe_res <= x"0000001E";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
-- add lsl
ck <= '0';
wait for 2 ns;
@ -171,7 +177,7 @@ begin
dec_shift_asr <= '0';
dec_shift_ror <= '0';
dec_shift_rrx <= '0';
dec_shift_val <= "00011"; --shift de 3
dec_shift_val <= "00011";
dec_alu_add <= '1';
dec_alu_and <= '0';
@ -197,6 +203,9 @@ begin
ck <= '1';
wait;
vexe_res <= x"00000780";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
-- and
ck <= '0';
wait for 2 ns;
@ -239,6 +248,10 @@ begin
ck <= '1';
wait;
vexe_res <= x"01000000";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
-- and lsr
ck <= '0';
wait for 2 ns;
@ -281,6 +294,10 @@ begin
ck <= '1';
wait;
vexe_res <= x"0000000";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
-- mov
ck <= '0';
wait for 2 ns;
@ -325,6 +342,10 @@ begin
ck <= '1';
wait;
vexe_res <= x"FFFFFFFF";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
-- or asr
ck <= '0';
wait for 2 ns;
@ -371,6 +392,10 @@ begin
ck <= '1';
wait;
vexe_res <= x"08000000";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
-- or
ck <= '0';
wait for 2 ns;
@ -413,6 +438,10 @@ begin
ck <= '1';
wait;
vexe_res <= x"01000001";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
-- xor
ck <= '0';
wait for 2 ns;
@ -455,7 +484,8 @@ begin
ck <= '1';
wait;
vexe_res <= x"00000001";
assert (exe_res = vexe_res) report "[error] lsl. vexe_res = " & integer'image(to_integer(unsigned(vexe_res))) & " versus exe_res = " & integer'image(to_integer(unsigned(exe_res))) severity error;
end process;