diff options
author | Anton Blanchard <anton@ozlabs.org> | 2019-10-16 14:40:59 +1100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2019-10-16 05:40:59 +0200 |
commit | b758bf4c7a5468dbf75972b767e3053b16768891 (patch) | |
tree | db196a5fabe82c5b11d50ea57379b961f81103e8 /testsuite | |
parent | 62dd7c9e0f60d436c843bc7a654b9c60ef5871cc (diff) | |
download | ghdl-yosys-plugin-b758bf4c7a5468dbf75972b767e3053b16768891.tar.gz ghdl-yosys-plugin-b758bf4c7a5468dbf75972b767e3053b16768891.tar.bz2 ghdl-yosys-plugin-b758bf4c7a5468dbf75972b767e3053b16768891.zip |
Add Id_Smul and Id_Umul (#64)
* Add Id_Smul and Id_Umul support
* Add testcase for Id_Smul and Id_Umul
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/pr64/testsuite.sh | 10 | ||||
-rw-r--r-- | testsuite/pr64/vector.vhdl | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/pr64/testsuite.sh b/testsuite/pr64/testsuite.sh new file mode 100755 index 0000000..7c3865a --- /dev/null +++ b/testsuite/pr64/testsuite.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +. ../testenv.sh + +run_yosys -p "ghdl vector.vhdl -e vector; opt; dump -o vector.il" + +grep -q 11111111111011110000000000100000000000001101111111110000000000000001000011111111111011110000000000000001000000000000000000000000 vector.il || exit 1 +grep -q 00000000000000000000000000001111111111111110111111110000000100000001000011111111111011110000000000000001000000000000000000000000 vector.il || exit 1 + +clean diff --git a/testsuite/pr64/vector.vhdl b/testsuite/pr64/vector.vhdl new file mode 100644 index 0000000..c88c117 --- /dev/null +++ b/testsuite/pr64/vector.vhdl @@ -0,0 +1,16 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity vector is + port ( + s : out signed(127 downto 0); + u : out unsigned(127 downto 0) + ); +end entity vector; + +architecture synth of vector is +begin + s <= signed'(x"ffff000000fffff0") * signed'(x"fff0000ffff00000"); + u <= unsigned'(x"ffff000000fffff0") * unsigned'(x"fff0000ffff00000"); +end synth; |