File tree Expand file tree Collapse file tree
tests/pathological_register_maps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -425,10 +425,47 @@ jobs:
425425 mypy autoformatted_output
426426 python -m unittest discover -s autoformatted_output
427427
428+ pathological :
429+
430+ needs :
431+ - integration_tests
432+
433+ runs-on : ubuntu-latest
434+
435+ steps :
436+ - uses : actions/checkout@v4
437+ - name : Set up Python
438+ uses : actions/setup-python@v5
439+ with :
440+ python-version : " 3.13"
441+
442+ - name : Install dependencies
443+ run : |
444+ python -m pip install --upgrade pip
445+ python -m pip install .[peakrdl]
446+ python -m pip install mypy
447+
448+ - name : Prepare System RDL
449+ run : |
450+ mkdir ./pathological_test
451+ python -m tests.pathological_register_maps.pathological_rdl_builder ./pathological_test/deep.rdl deep
452+
453+ - name : build_package
454+ run : |
455+ peakrdl python ./pathological_test/deep.rdl -o ./pathological_test/ --skip_library_copy
456+
457+ - name : type check generated code
458+ run : |
459+ mypy ./pathological_test/deep/
460+
461+ - name : Run unit tests
462+ run : python -m unittest discover -s ./pathological_test/
463+
428464 # -------------------------------------------------------------------------------
429465 build :
430466 needs :
431467 - autoformating
468+ - pathological
432469
433470 name : Build source distribution
434471 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1717
1818The file is used for making pathological system RDL files for stress testing the tool
1919"""
20+ import argparse
2021import os
2122from typing import Optional
2223from pathlib import Path
@@ -232,7 +233,17 @@ def addrmap_generator():
232233 name_prefix = 'top_level_addr' )
233234
234235
236+ CommandLineParser = argparse .ArgumentParser (
237+ description = 'Generate a pathological system RDL file to test the generator' )
238+ CommandLineParser .add_argument ('output_filename' , type = Path ,
239+ help = 'Filename of the systemRDL file to generate' )
240+ CommandLineParser .add_argument ('addrmap_name' , type = str ,
241+ help = 'Name of the top level address map' )
242+
235243if __name__ == '__main__' :
236244
245+ CommandLineArgs = CommandLineParser .parse_args ()
246+
237247 generator = PathologicalRDL ()
238- generator .export_code (Path ('deep.rdl' ), addrmap_name = 'deep' )
248+ generator .export_code (CommandLineArgs .output_filename ,
249+ addrmap_name = CommandLineArgs .addrmap_name )
You can’t perform that action at this time.
0 commit comments