diff options
-rw-r--r-- | testsuite/gna/issue1764/repro.vhdl | 47 | ||||
-rwxr-xr-x | testsuite/gna/issue1764/testsuite-osvvm.sh | 87 | ||||
-rwxr-xr-x | testsuite/gna/issue1764/testsuite.sh | 11 |
3 files changed, 145 insertions, 0 deletions
diff --git a/testsuite/gna/issue1764/repro.vhdl b/testsuite/gna/issue1764/repro.vhdl new file mode 100644 index 000000000..a00be03ba --- /dev/null +++ b/testsuite/gna/issue1764/repro.vhdl @@ -0,0 +1,47 @@ +entity repro is +end; + +architecture behav of repro is + type my_channel is record + valid : bit; + ack : bit; + data : bit_vector; + end record; + + type my_bus is record + waddr : my_channel; + wdata : my_channel; + end record; + + function init_channel (fmt : my_channel) return my_channel is + begin + return (valid => '0', + ack => '0', + data => (fmt.data'range => '0')); + end init_channel; + + function init_bus (fmt: my_bus) return my_bus is + begin + return (waddr => init_channel (fmt.waddr), + wdata => init_channel (fmt.wdata)); + end init_bus; + + constant chan8 : my_channel := (valid => '0', ack => '0', data => x"a5"); +begin + process + variable b0 : my_bus (waddr(data (7 downto 0)), wdata (data (15 downto 0))); + variable b1 : b0'subtype; + begin + b1 := init_bus(b1); + assert b1.waddr.valid = '0'; + assert b1.waddr.ack = '0'; + assert b1.waddr.data = "00000000"; + + assert b1.wdata.valid = '0'; + assert b1.wdata.ack = '0'; + assert b1.wdata.data = x"0000"; + + wait; + end process; +end behav; + diff --git a/testsuite/gna/issue1764/testsuite-osvvm.sh b/testsuite/gna/issue1764/testsuite-osvvm.sh new file mode 100755 index 000000000..e05c92748 --- /dev/null +++ b/testsuite/gna/issue1764/testsuite-osvvm.sh @@ -0,0 +1,87 @@ +#! /bin/sh + +. ../../testenv.sh + +COMMON_FLAGS="--std=08" +COMMON_FLAGS="$COMMON_FLAGS -O -g" +#COMMON_FLAGS="$COMMON_FLAGS --post -Wp,-g" +export GHDL_STD_FLAGS=$COMMON_FLAGS + +GHDL_STD_FLAGS="$COMMON_FLAGS --work=osvvm" +DIR=OSVVM +analyze $DIR/NamePkg.vhd +analyze $DIR/OsvvmGlobalPkg.vhd + +analyze $DIR/VendorCovApiPkg.vhd + +analyze $DIR/TranscriptPkg.vhd +analyze $DIR/TextUtilPkg.vhd +analyze $DIR/AlertLogPkg.vhd + +analyze $DIR/MessagePkg.vhd +analyze $DIR/SortListPkg_int.vhd +analyze $DIR/RandomBasePkg.vhd +analyze $DIR/RandomPkg.vhd +analyze $DIR/CoveragePkg.vhd +analyze $DIR/MemoryPkg.vhd + +analyze $DIR/ScoreboardGenericPkg.vhd +analyze $DIR/ScoreboardPkg_slv.vhd +analyze $DIR/ScoreboardPkg_int.vhd + +analyze $DIR/ResolutionPkg.vhd +analyze $DIR/TbUtilPkg.vhd + +analyze $DIR/OsvvmContext.vhd + +GHDL_STD_FLAGS="$COMMON_FLAGS --work=osvvm_common" +DIR=OsvvmLibraries/Common +#analyze $DIR/src/StreamTransactionPkg.vhd +analyze $DIR/src/AddressBusTransactionPkg.vhd +analyze $DIR/src/AddressBusResponderTransactionPkg.vhd +#analyze $DIR/src/AddressBusVersionCompatibilityPkg.vhd +analyze $DIR/src/ModelParametersPkg.vhd +#analyze $DIR/src/FifoFillPkg_slv.vhd +#analyze $DIR/src/InterruptHandler.vhd +#analyze $DIR/src/InterruptHandlerComponentPkg.vhd +analyze $DIR/src/OsvvmCommonContext.vhd + +GHDL_STD_FLAGS="$COMMON_FLAGS --work=osvvm_axi4" +DIR=OsvvmLibraries/AXI4/common +analyze $DIR/src/Axi4LiteInterfacePkg.vhd +analyze $DIR/src/Axi4InterfacePkg.vhd +analyze $DIR/src/Axi4CommonPkg.vhd +analyze $DIR/src/Axi4ModelPkg.vhd +analyze $DIR/src/Axi4OptionsPkg.vhd +#analyze $DIR/src/Axi4VersionCompatibilityPkg.vhd + +DIR=OsvvmLibraries/AXI4/Axi4 +analyze $DIR/src/Axi4ComponentPkg.vhd +#analyze $DIR/src/Axi4ComponentVtiPkg.vhd +analyze $DIR/src/Axi4Context.vhd +analyze $DIR/src/Axi4Master.vhd +#analyze $DIR/src/Axi4MasterVti.vhd +analyze $DIR/src/Axi4Monitor_dummy.vhd +analyze $DIR/src/Axi4Responder_Transactor.vhd +#analyze $DIR/src/Axi4ResponderVti_Transactor.vhd +#analyze $DIR/src/Axi4Memory.vhd +#analyze $DIR/src/Axi4MemoryVti.vhd + +GHDL_STD_FLAGS="$COMMON_FLAGS" +DIR=ghdl_issues/GHDL_1764_Axi4Master_Sim_Fails/Axi4Testbench_fails/ + +#analyze --work=osvvm_axi4 $DIR/Axi4Master.vhd +analyze $DIR/TestCtrl_e_ghdl.vhd +analyze $DIR/TbAxi4.vhd +analyze $DIR/TbAxi4Memory.vhd + +DIR=ghdl_issues/GHDL_1764_Axi4Master_Sim_Fails/TestCases/ +analyze $DIR/TbAxi4_BasicReadWrite.vhd +elab_simulate TbAxi4_BasicReadWrite + +analyze $DIR/TbAxi4_MemoryReadWrite1.vhd +elab_simulate TbAxi4_MemoryReadWrite1 + +clean + +echo "Test successful" diff --git a/testsuite/gna/issue1764/testsuite.sh b/testsuite/gna/issue1764/testsuite.sh new file mode 100755 index 000000000..15fea4385 --- /dev/null +++ b/testsuite/gna/issue1764/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze repro.vhdl +elab_simulate repro --assert-level=error + +clean + +echo "Test successful" |