-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
242 additions
and
173 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
sudo make install | ||
cd .. | ||
pip install peakrdl | ||
pip install peakrdl rich | ||
- name: run tests | ||
run: | | ||
|
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
add_subdirectory(print) | ||
add_subdirectory(regblock) |
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,63 @@ | ||
include("../../../../SoCMakeConfig.cmake") | ||
include("../../../utils/test_utils.cmake") | ||
|
||
cmake_minimum_required(VERSION 3.25) | ||
project(test NONE) | ||
|
||
### A simple test with default arguments | ||
add_ip(ip) | ||
|
||
ip_sources(${IP} SYSTEMRDL | ||
${CMAKE_CURRENT_LIST_DIR}/ip.rdl | ||
) | ||
|
||
peakrdl_regblock(${IP}) | ||
|
||
include(CTest) | ||
enable_testing() | ||
|
||
find_python3() | ||
add_test_makefile_rule_match_patterns(${IP}_peakrdl_regblock | ||
"${Python3_EXECUTABLE} -m" | ||
"peakrdl regblock" | ||
"--rename ${IP_NAME}_regblock" | ||
"--cpuif apb3-flat" | ||
"-o ${PROJECT_BINARY_DIR}/${IP}_peakrdl_regblock" | ||
"${CMAKE_CURRENT_LIST_DIR}/ip.rdl" | ||
) | ||
set_property(TEST ${IP}_peakrdl_regblock_makefile_validate PROPERTY LABELS peakrdl) | ||
|
||
##### Test with mutliple arguments | ||
add_ip(ip2) | ||
|
||
ip_sources(${IP} SYSTEMRDL | ||
${CMAKE_CURRENT_LIST_DIR}/ip2.rdl | ||
) | ||
|
||
ip_link(ip2 ip) | ||
|
||
peakrdl_regblock(${IP} | ||
OUTDIR ${PROJECT_BINARY_DIR}/ip2_regblock | ||
INTF axi4-lite | ||
RENAME random_ip | ||
RESET arst_n | ||
ARGS --addr-width 8 | ||
--rt-read-response | ||
) | ||
|
||
include(CTest) | ||
enable_testing() | ||
|
||
find_python3() | ||
add_test_makefile_rule_match_patterns(${IP}_peakrdl_regblock | ||
"${Python3_EXECUTABLE} -m" | ||
"peakrdl regblock" | ||
"--rename random_ip" | ||
"--cpuif axi4-lite" | ||
"--default-reset arst_n" | ||
"--addr-width 8" | ||
"--rt-read-response" | ||
"-o ${PROJECT_BINARY_DIR}/ip2_regblock" | ||
"${CMAKE_CURRENT_LIST_DIR}/ip.rdl ${CMAKE_CURRENT_LIST_DIR}/ip2.rdl" # Keep them in single string to enforce order | ||
) | ||
set_property(TEST ${IP}_peakrdl_regblock_makefile_validate PROPERTY LABELS peakrdl) |
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,18 @@ | ||
addrmap ip { | ||
reg { | ||
regwidth = 32; | ||
field { | ||
hw = rw; sw = rw; | ||
fieldwidth = 32; | ||
} f1; | ||
} r1; | ||
|
||
reg { | ||
regwidth = 32; | ||
field { | ||
hw = r; sw = rw; | ||
fieldwidth = 32; | ||
} f1; | ||
} r2; | ||
|
||
}; |
Oops, something went wrong.