Quick Start¶
RegFab command takes Excel file or XML file as design input, and generate output based on the template mechanism.
To have a overview of RegFab command syntax, run below command:
$> qk regfab -h
usage: qk regfab [-h] [-f CMDFILE] [-i] [-g] [-k KLASS] [-K KLASS] [-t TYPE]
[-o OUTFILE] [-p PARAMETER] [-b BASEADDRESS]
[infile]
positional arguments:
infile Input XML file
optional arguments:
-h, --help show this help message and exit
-f CMDFILE, --cmdfile CMDFILE
Command file
-i, --interactive Command mode
-g, --gui GUI mode
-k KLASS, --klass KLASS
Input file class
-K KLASS, --Klass KLASS
Output file class
-t TYPE, --type TYPE Template name
-o OUTFILE, --outfile OUTFILE
Output filename
-p PARAMETER, --parameter PARAMETER
Parameter list
-b BASEADDRESS, --baseaddress BASEADDRESS
Set BaseAddress
To generate register document, run below command with .XML design file or Excel design file:
$> qk regfab -t html -o reg-doc.html xxx.xml
$> qk regfab -t html -o reg-doc.html xxx.xlsx
To generate register design code, run:
$> qk regfab -t code-verilog -o reg-block.v xxx.xml
$> qk regfab -t code-verilog -o reg-block.v xxx.xlsx
To generate C header file, run:
$> qk regfab -t code-c-header -o reg.h xxx.xml
To generate UVM register model file, run:
$> qk regfab -t uvm-regmodel -o regmodel.sv xxx.xlsx
To generate SVD (System View Description) file, run:
$> qk regfab -t svd -o module.svd xxx.xml
To generate Lauterbach Trace32 peripheral file, run:
$> qk regfab -t Trace32 -o module.per xxx.xml
To generate Word .docx file, run:
$> qk regfab -t docx -o module.docx xxx.xml
To use a non-default base-address, run:
$> qk regfab -t html -o reg-doc.html -b 0x3000 xxx.xml
To transform Excel file to .XML file, or vice verce, run:
$> qk regfab -o a.xml xxx.xlsx
$> qk regfab -o a.xlsx xxx.xml
If the file extension can’t indicate its file type, use switch -k kind
to specify input file type, and switch -K kind
to specify output file type:
$> qk regfab -o a.xlsx -k ipxact xxx.txt
$> qk regfab -o a.txt -K ipxact xxx.xlsx
To enter Interactive Mode, run:
$> qk regfab -i
This is a register related tool
regFab:>
To run in Batch Mode, see blow:
$> qk regfab -f a.cmd
To enter GUI Mode, run:
$> qk regfab -g