diff options
author | Tristan Gingold | 2015-09-10 20:24:33 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-09-10 20:24:33 +0200 |
commit | a67ae38eeedd5d0ca5a75b8174aed201e5c801ad (patch) | |
tree | 9e24b723ab5c8d0d46041433bb3154ffed4527b4 /testsuite/gna/bug019/PoC/tb/common/config_tb.vhdl | |
parent | 0e257fe7341a44f097ea282c0cbabda42f4ecc41 (diff) | |
download | ghdl-a67ae38eeedd5d0ca5a75b8174aed201e5c801ad.tar.gz ghdl-a67ae38eeedd5d0ca5a75b8174aed201e5c801ad.tar.bz2 ghdl-a67ae38eeedd5d0ca5a75b8174aed201e5c801ad.zip |
Add bug019 testcase.
Diffstat (limited to 'testsuite/gna/bug019/PoC/tb/common/config_tb.vhdl')
-rw-r--r-- | testsuite/gna/bug019/PoC/tb/common/config_tb.vhdl | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/testsuite/gna/bug019/PoC/tb/common/config_tb.vhdl b/testsuite/gna/bug019/PoC/tb/common/config_tb.vhdl new file mode 100644 index 0000000..1c0ab59 --- /dev/null +++ b/testsuite/gna/bug019/PoC/tb/common/config_tb.vhdl @@ -0,0 +1,76 @@ +-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*- +-- vim: tabstop=2:shiftwidth=2:noexpandtab +-- kate: tab-width 2; replace-tabs off; indent-width 2; +-- +-- ============================================================================= +-- Testbench: Tests global constants, functions and settings +-- +-- Authors: Thomas B. Preusser +-- Patrick Lehmann +-- +-- Description: +-- ------------------------------------ +-- TODO +-- +-- License: +-- ============================================================================= +-- Copyright 2007-2014 Technische Universitaet Dresden - Germany +-- Chair for VLSI-Design, Diagnostics and Architecture +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- ============================================================================= + +entity config_tb is +end config_tb; + + +library PoC; +use PoC.config.all; +use PoC.utils.all; +use PoC.simulation.all; + + +architecture tb of config_tb is + signal SimQuiet : BOOLEAN := true; +begin + process + begin + if (SimQuiet = FALSE) then + report "is simulation?: " & boolean'image(SIMULATION) severity note; + report "Vendor: " & vendor_t'image(VENDOR) severity note; + report "Device: " & device_t'image(DEVICE) severity note; + report "Device Number: " & integer'image(DEVICE_NUMBER) severity note; + report "Device Subtype: " & T_DEVICE_SUBTYPE'image(DEVICE_SUBTYPE) severity note; + report "Device Series: " & integer'image(DEVICE_SERIES) severity note; + report "--------------------------------------------------" severity note; + report "LUT fan-in: " & integer'image(LUT_FANIN) severity note; + report "Transceiver: " & T_TRANSCEIVER'image(TRANSCEIVER_TYPE) severity note; + end if; + + tbAssert((SIMULATION = TRUE), "SIMULATION=" & BOOLEAN'image(SIMULATION) & " Expected=TRUE"); + tbAssert((VENDOR = VENDOR_XILINX), "VENDOR= " & VENDOR_T'image(VENDOR) & " Expected=VENDOR_XILINX"); + tbAssert((DEVICE = DEVICE_KINTEX7), "DEVICE=" & DEVICE_T'image(DEVICE) & " Expected=DEVICE_KINTEX7"); + tbAssert((DEVICE_FAMILY = DEVICE_FAMILY_KINTEX), "DEVICE_FAMILY=" & T_DEVICE_FAMILY'image(DEVICE_FAMILY) & " Expected=DEVICE_FAMILY_KINTEX"); + tbAssert((DEVICE_NUMBER = 325), "DEVICE_NUMBER=" & INTEGER'image(DEVICE_NUMBER) & " Expected=325"); + tbAssert((DEVICE_SUBTYPE = DEVICE_SUBTYPE_T), "DEVICE_SUBTYPE=" & T_DEVICE_SUBTYPE'image(DEVICE_SUBTYPE) & " Expected=DEVICE_SUBTYPE_T"); + tbAssert((DEVICE_SERIES = 7), "DEVICE_SERIES=" & INTEGER'image(DEVICE_SERIES) & " Expected=7"); + tbAssert((LUT_FANIN = 6), "LUT_FANIN=" & INTEGER'image(LUT_FANIN) & " Expected=6"); + tbAssert((TRANSCEIVER_TYPE = TRANSCEIVER_GTXE2), "TRANSCEIVER_TYPE=" & T_TRANSCEIVER'image(TRANSCEIVER_TYPE) & " Expected=TRANSCEIVER_GTXE2"); + + -- simulation completed + + -- Report overall simulation result + tbPrintResult; + wait; + end process; +end; |