|
1 | 1 | library vunit_lib; |
2 | 2 | context vunit_lib.vunit_context; |
3 | 3 |
|
4 | | -use work.json.all; |
| 4 | +use work.json.T_JSON; |
| 5 | +use work.json.jsonLoad; |
| 6 | +use work.json.jsonGetString; |
5 | 7 |
|
6 | 8 | entity tb_boards is |
7 | 9 | generic ( |
8 | | - runner_cfg : string; |
9 | | - tb_path : string; |
10 | | - filename : string |
| 10 | + runner_cfg : string; |
| 11 | + tb_path : string; |
| 12 | + tb_cfg : string; |
| 13 | + tb_cfg_file : string |
11 | 14 | ); |
12 | 15 | end entity; |
13 | 16 |
|
14 | 17 | architecture tb of tb_boards is |
15 | | - constant JSONContent : T_JSON := jsonLoadFile(tb_path & filename); |
| 18 | + constant JSONContent : T_JSON := jsonLoad(tb_cfg); |
| 19 | + constant JSONFileContent : T_JSON := jsonLoad(tb_cfg_file); |
16 | 20 | begin |
17 | 21 | main: process |
18 | 22 | begin |
19 | 23 | test_runner_setup(runner, runner_cfg); |
20 | 24 | while test_suite loop |
21 | 25 | 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 | + info("tb_cfg: " & tb_cfg); |
| 27 | + info("JSONContent: " & lf & JSONContent.Content); |
| 28 | + info("ML505/FPGA: " & jsonGetString(JSONContent, "ML505/FPGA")); |
| 29 | + info("ML505/Eth/0/PHY-Int: " & jsonGetString(JSONContent, "ML505/Eth/0/PHY-Int")); |
| 30 | + info("KC705/FPGA: " & jsonGetString(JSONContent, "KC705/FPGA")); |
| 31 | + info("KC705/IIC/0/Devices/0/Name: " & jsonGetString(JSONContent, "KC705/IIC/0/Devices/0/Name")); |
| 32 | + |
| 33 | + info("tb_path & tb_cfg_file: " & tb_path & tb_cfg_file); |
| 34 | + info("JSONFileContent: " & lf & JSONFileContent.Content); |
| 35 | + info("ML505/FPGADevice: " & jsonGetString(JSONFileContent, "ML505/FPGADevice")); |
| 36 | + info("ML505/Ethernet/0/PHY_Device: " & jsonGetString(JSONFileContent, "ML505/Ethernet/0/PHY_Device")); |
| 37 | + info("KC705/FPGADevice: " & jsonGetString(JSONFileContent, "KC705/FPGADevice")); |
| 38 | + info("KC705/IIC/0/Devices/0/Type: " & jsonGetString(JSONFileContent, "KC705/IIC/0/Devices/0/Type")); |
26 | 39 | end if; |
27 | 40 | end loop; |
28 | 41 | test_runner_cleanup(runner); |
|
0 commit comments