From aec70e17120c4ee3d949263621286dfd650d3df2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 13 Mar 2019 19:53:30 +0100 Subject: Add testcase for #779 --- testsuite/gna/issue779/testsuite.sh | 9 +++++ testsuite/gna/issue779/tvm_pkg.vhdl | 66 +++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100755 testsuite/gna/issue779/testsuite.sh create mode 100644 testsuite/gna/issue779/tvm_pkg.vhdl (limited to 'testsuite/gna') diff --git a/testsuite/gna/issue779/testsuite.sh b/testsuite/gna/issue779/testsuite.sh new file mode 100755 index 000000000..dbbd44243 --- /dev/null +++ b/testsuite/gna/issue779/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +$GHDL -s --expect-failure --std=08 tvm_pkg.vhdl + +clean + +echo "Test successful" diff --git a/testsuite/gna/issue779/tvm_pkg.vhdl b/testsuite/gna/issue779/tvm_pkg.vhdl new file mode 100644 index 000000000..fe32ea90b --- /dev/null +++ b/testsuite/gna/issue779/tvm_pkg.vhdl @@ -0,0 +1,66 @@ +library ieee; +use ieee.std_logic_1164.all; + +library ipbus; + + +package ipbus_tvm_pkg is + + --=============================================================================================== + -- Types and constants for IPbus TVM + --=============================================================================================== + constant C_SCOPE : string := "IPbus TVM"; + + type t_ipbus_transaction_type_id is ( + READ, + WRITE, + NON_INC_READ, -- Non-incrementing read + NON_INC_WRITE, -- Non-incrementing write + RMW_BITS, -- Read/modify/write bits + RMW_SUM, -- Read/modify/write sum + CONF_SPACE_READ, -- Configuration space read + CONF_SPACE_WRITE -- Configuration space write + ); + + type t_ipbus_transaction_info_code is ( + REQ_HANDLED_SUCCESSFULLY, -- Request handled successfully by target + BAD_HEADER, + RESERVED_0x2, + RESERVED_0x3, + BUS_ERROR_ON_READ, + BUS_ERROR_ON_WRITE, + BUS_TIMEOUT_ON_READ, + BUS_TIMEOUT_ON_WRITE, + RESERVED_0x8, + RESERVED_0x9, + RESERVED_0xA, + RESERVED_0xB, + RESERVED_0xC, + RESERVED_0xD, + RESERVED_0xE, + OUTBOUND_REQUEST + ); + + type t_ipbus_tranaction_header is + record + protocol_version : natural; + transaction_id : natural; + words : natural; + type_id : t_ipbus_transaction_type_id; + info_code : t_ipbus_transaction_info_code; + end record; + + type t_ipbus_transaction is + record + header : t_ipbus_tranaction_header; + _body : t_slv_array; + end record; + +end package ipbus_tvm_pkg; + +--================================================================================================= +--================================================================================================= + +package body ipbus_tvm_pkg is + +end package body ipbus_tvm_pkg; -- cgit v1.2.3