File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ library vunit_lib;
2+ context vunit_lib.vunit_context;
3+
4+ use work.json.all ;
5+
6+ entity tb_boards is
7+ generic (
8+ runner_cfg : string ;
9+ tb_path : string ;
10+ filename : string
11+ );
12+ end entity ;
13+
14+ architecture tb of tb_boards is
15+ constant JSONContent : T_JSON := jsonLoadFile(tb_path & filename);
16+ begin
17+ main: process
18+ begin
19+ test_runner_setup(runner, runner_cfg);
20+ while test_suite loop
21+ if run(" test" ) then
22+ info(tb_path& filename);
23+ info(" KC705/FPGADevice: " & jsonGetString(JSONContent, " KC705/FPGADevice" ));
24+ info(" KC705/IIC/0/Devices/1/Type: " & jsonGetString(JSONContent, " KC705/IIC/0/Devices/1/Type" ));
25+ info(" DE4/Ethernet/2/PHY_ManagementInterface: " & jsonGetString(JSONContent, " DE4/Ethernet/2/PHY_ManagementInterface" ));
26+ end if ;
27+ end loop ;
28+ test_runner_cleanup(runner);
29+ wait ;
30+ end process ;
31+ end architecture ;
Original file line number Diff line number Diff line change 1+ from os .path import join , dirname
2+ from vunit import VUnit
3+
4+ root = dirname (__file__ )
5+
6+ vu = VUnit .from_argv ()
7+
8+ lib = vu .add_library ("lib" )
9+ lib .add_source_files (join (root , "../vhdl/JSON.pkg.vhdl" ))
10+ lib .add_source_files (join (root , "../Examples/Boards_VUnit.vhdl" ))
11+
12+ vu .set_generic ("filename" ,"../Data/Boards2.json" )
13+
14+ vu .main ()
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ cd $( dirname $0 )
4+
5+ $( command -v winpty) docker run --rm -it \
6+ -v /$( realpath $( pwd) /..) ://work \
7+ -w //work \
8+ ghdl/ext:vunit-master bash -c " cd ./VUnit && VUNIT_SIMULATOR=ghdl python3 run.py -v"
You can’t perform that action at this time.
0 commit comments