-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from arturum1/main
Fix py2hwsw bugs and lib modules; Update README and User Guide; Add tester (WIP).
- Loading branch information
Showing
53 changed files
with
873 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 127 additions & 0 deletions
127
py2hwsw/lib/hardware/basic_tests/iob_aoi/submodules/tester/iob_aoi_tester.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# SPDX-FileCopyrightText: 2024 IObundle | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
|
||
def setup(py_params_dict): | ||
attributes_dict = { | ||
# Set "is_tester" attribute to generate Makefile and flows allowing to run this core as top module | ||
"is_tester": True, | ||
"version": "0.1", | ||
"confs": [ | ||
{ | ||
"name": "W", | ||
"type": "P", | ||
"val": "21", | ||
"min": "1", | ||
"max": "32", | ||
"descr": "IO width", | ||
}, | ||
], | ||
"wires": [ | ||
{ | ||
"name": "a", | ||
"descr": "AOI input port 1", | ||
"signals": [ | ||
{"name": "a", "width": "W"}, | ||
], | ||
}, | ||
{ | ||
"name": "b", | ||
"descr": "AOI input port 2", | ||
"signals": [ | ||
{"name": "b", "width": "W"}, | ||
], | ||
}, | ||
{ | ||
"name": "c", | ||
"descr": "AOI input port 3", | ||
"signals": [ | ||
{"name": "c", "width": "W"}, | ||
], | ||
}, | ||
{ | ||
"name": "d", | ||
"descr": "AOI input port 4", | ||
"signals": [ | ||
{"name": "d", "width": "W"}, | ||
], | ||
}, | ||
{ | ||
"name": "y", | ||
"descr": "AOI output port", | ||
"signals": [ | ||
{"name": "y", "width": "W"}, | ||
], | ||
}, | ||
], | ||
"subblocks": [ | ||
{ | ||
"core_name": "iob_aoi", | ||
"instance_name": "uut_aoi", | ||
"instance_description": "Unit Under Test", | ||
"parameters": { | ||
"W": "W", | ||
}, | ||
"connect": { | ||
"a_i": "a", | ||
"b_i": "b", | ||
"c_i": "c", | ||
"d_i": "d", | ||
"y_o": "y", | ||
}, | ||
} | ||
], | ||
"superblocks": [ | ||
{ | ||
"name": "simulation", | ||
"descr": "Blocks for simulation", | ||
"blocks": [ | ||
# Simulation wrapper | ||
{ | ||
"core_name": "iob_sim", | ||
"instance_name": "iob_sim", | ||
"dest_dir": "hardware/simulation/src", | ||
}, | ||
], | ||
}, | ||
], | ||
"snippets": [ | ||
{ | ||
"verilog_code": """\ | ||
// Tester body / verification code | ||
// Currently using non-synthesizable code | ||
reg [3:0] data_i = 0; | ||
wire data_o; | ||
assign a = data_i[0]; | ||
assign b = data_i[1]; | ||
assign c = data_i[2]; | ||
assign d = data_i[3]; | ||
assign data_o = y; | ||
integer i; | ||
integer fp; | ||
initial begin | ||
for (i = 0; i < 16; i = i + 1) begin | ||
#10 data_i = i[3:0]; | ||
#10 $display("data_i = %b, data_o = %b", data_i, data_o); | ||
end | ||
#10 $display("%c[1;34m", 8'd27); | ||
$display("Test completed successfully."); | ||
$display("%c[0m", 8'd27); | ||
fp = $fopen("test.log", "w"); | ||
$fdisplay(fp, "Test passed!"); | ||
$finish(); | ||
end | ||
""" | ||
} | ||
], | ||
} | ||
|
||
return attributes_dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.