Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few changes #44

Merged
merged 12 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ jobs:
- run: make compile_ghdl
- run: make compile_verilator
- run: make test_c
- run: make test_rst

2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ clean:
validate:
xmllint --noout --schema ipxact2systemverilog/xml/component.xsd example/input/test.xml

test_rst:
rst-lint example/output/*.rst

venv: requirements.txt
python3 -m venv ./venv
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ xmllint --noout --schema ipxact2systemverilog/xml/component.xsd example/input/t
## Dependencies

```bash
pip install docutils lxml tabulate mdutils
pip install docutils lxml mdutils
```

## Dependencies used by makefile
Expand Down
1 change: 1 addition & 0 deletions bin/ipxact2c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if __name__ == '__main__':

config = configparser.ConfigParser()
if args.config:
config.read_dict(DEFAULT_INI)
config.read(args.config)
else:
config.read_dict(DEFAULT_INI)
Expand Down
1 change: 1 addition & 0 deletions bin/ipxact2md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if __name__ == '__main__':

config = configparser.ConfigParser()
if args.config:
config.read_dict(DEFAULT_INI)
config.read(args.config)
else:
config.read_dict(DEFAULT_INI)
Expand Down
1 change: 1 addition & 0 deletions bin/ipxact2rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if __name__ == '__main__':

config = configparser.ConfigParser()
if args.config:
config.read_dict(DEFAULT_INI)
config.read(args.config)
else:
config.read_dict(DEFAULT_INI)
Expand Down
1 change: 1 addition & 0 deletions bin/ipxact2systemverilog
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if __name__ == '__main__':

config = configparser.ConfigParser()
if args.config:
config.read_dict(DEFAULT_INI)
config.read(args.config)
else:
config.read_dict(DEFAULT_INI)
Expand Down
1 change: 1 addition & 0 deletions bin/ipxact2vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if __name__ == '__main__':

config = configparser.ConfigParser()
if args.config:
config.read_dict(DEFAULT_INI)
config.read(args.config)
else:
config.read_dict(DEFAULT_INI)
Expand Down
1 change: 1 addition & 0 deletions example/input/test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<spirit:name>unusedMemoryMapName</spirit:name>
<spirit:addressBlock>
<spirit:name>example</spirit:name>
<spirit:description>Demo example used for the testing of the ipxact2systemverilog tool.</spirit:description>
<spirit:baseAddress>0</spirit:baseAddress>
<spirit:range>6</spirit:range>
<spirit:width>32</spirit:width>
Expand Down
Binary file modified example/output/example.docx
Binary file not shown.
25 changes: 17 additions & 8 deletions example/output/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Register description</title>
<title>example</title>
<style type="text/css">

/* Minimal style sheet for the HTML output of Docutils. */
Expand Down Expand Up @@ -291,7 +291,7 @@
/* Rules for easy reading and pre-defined style variants. */
/* */
/* :Author: Günter Milde, based on html4css1.css by David Goodger */
/* :Id: $Id: plain.css 9081 2022-06-19 20:23:12Z milde $ */
/* :Id: $Id: plain.css 9338 2023-04-08 21:08:47Z milde $ */
/* :Copyright: © 2015 Günter Milde. */
/* :License: Released under the terms of the `2-Clause BSD license`_, */
/* in short: */
Expand Down Expand Up @@ -570,7 +570,8 @@
font-weight: bold;
}
mstyle.mathscr, mi.mathscr {
font-family: STIX;
font-family: STIX, XITSMathJax_Script, rsfs10,
"Asana Math", Garamond, cursive;
}

/* Epigraph */
Expand Down Expand Up @@ -603,9 +604,15 @@
</style>
</head>
<body>
<main id="register-description">
<h1 class="title">Register description</h1>
<main id="example">
<h1 class="title">example</h1>

<p>Demo example used for the testing of the ipxact2systemverilog tool.</p>
<dl class="field-list simple">
<dt>Base Address<span class="colon">:</span></dt>
<dd><p>0x0</p>
</dd>
</dl>
<section id="registers">
<h2>Registers</h2>
<table>
Expand Down Expand Up @@ -894,7 +901,8 @@ <h2>reg4</h2>
<dd><p>read-write</p>
</dd>
<dt>Description<span class="colon">:</span></dt>
<dd><p>reg4 is a very useful register. It can take down the moon when configured correctly.</p>
<dd><p>reg4 is a very useful register. It can take down the moon
when configured correctly.</p>
</dd>
</dl>
<table>
Expand Down Expand Up @@ -927,7 +935,8 @@ <h2>reg5</h2>
<dd><p>read-write</p>
</dd>
<dt>Description<span class="colon">:</span></dt>
<dd><p>reg5 is as useful as reg4 but without a reset value defined.</p>
<dd><p>reg5 is as useful as reg4 but without a reset value
defined.</p>
</dd>
</dl>
<table>
Expand Down
8 changes: 7 additions & 1 deletion example/output/example.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

# Register description
# example


Demo example used for the testing of the ipxact2systemverilog tool.

Base Address: 0x0


## Registers

Expand Down
76 changes: 41 additions & 35 deletions example/output/example.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
====================
Register description
====================
=======
example
=======

Demo example used for the testing of the ipxact2systemverilog tool.

:Base Address: 0x0

Registers
---------
Expand Down Expand Up @@ -30,10 +34,10 @@ Registers
reg0
----

:Name: reg0
:Address: 0x0
:Name: reg0
:Address: 0x0
:Reset Value: 0x00000000
:Access: read-write
:Access: read-write
:Description: write something useful for reg0

+---------+--------------+---------+-----------------------------------+
Expand All @@ -51,11 +55,11 @@ reg0
reg1
----

:Name: reg1
:Address: 0x1
:Name: reg1
:Address: 0x1
:Reset Value: 0x00000001
:Access: read-write
:Description:
:Access: read-write
:Description:

+--------+--------------+------------+-----------------------------------+
| Bits | Field name | Reset | Description |
Expand All @@ -66,10 +70,10 @@ reg1
reg2
----

:Name: reg2
:Address: 0x2
:Name: reg2
:Address: 0x2
:Reset Value: 0x00000001
:Access: read-write
:Access: read-write
:Description: write something useful for reg2

+--------+--------------+---------+-----------------------------------------+
Expand All @@ -85,7 +89,7 @@ reg2
+--------+--------------+---------+-----------------------------------------+

monkey
,,,,,,
~~~~~~

+---------+---------+--------------------+
| Name | Value | Description |
Expand All @@ -98,7 +102,7 @@ monkey
+---------+---------+--------------------+

monkey2
,,,,,,,
~~~~~~~

+---------+---------+---------------+
| Name | Value | Description |
Expand All @@ -113,10 +117,10 @@ monkey2
reg3
----

:Name: reg3
:Address: 0x3
:Name: reg3
:Address: 0x3
:Reset Value: 0x00000001
:Access: read-write
:Access: read-write
:Description: write something useful for reg3

+--------+--------------+------------+-----------------------------------+
Expand All @@ -128,11 +132,12 @@ reg3
reg4
----

:Name: reg4
:Address: 0x4
:Name: reg4
:Address: 0x4
:Reset Value: 0x0000000c
:Access: read-write
:Description: reg4 is a very useful register. It can take down the moon when configured correctly.
:Access: read-write
:Description: reg4 is a very useful register. It can take down the moon
when configured correctly.

+--------+--------------+------------+---------------+
| Bits | Field name | Reset | Description |
Expand All @@ -143,10 +148,11 @@ reg4
reg5
----

:Name: reg5
:Address: 0x5
:Access: read-write
:Description: reg5 is as useful as reg4 but without a reset value defined.
:Name: reg5
:Address: 0x5
:Access: read-write
:Description: reg5 is as useful as reg4 but without a reset value
defined.

+--------+--------------+---------------+
| Bits | Field name | Description |
Expand All @@ -157,9 +163,9 @@ reg5
reg6
----

:Name: reg6
:Address: 0x6
:Access: read-only
:Name: reg6
:Address: 0x6
:Access: read-only
:Description: reg6 is a read only register.

+--------+--------------+---------------+
Expand All @@ -171,10 +177,10 @@ reg6
reg7
----

:Name: reg7
:Address: 0x7
:Name: reg7
:Address: 0x7
:Reset Value: 0x00000000
:Access: read-write
:Access: read-write
:Description: write something useful for reg7

+---------+--------------+---------+------------------------------------+
Expand All @@ -194,10 +200,10 @@ reg7
reg8
----

:Name: reg8
:Address: 0x8
:Name: reg8
:Address: 0x8
:Reset Value: 0x00000000
:Access: read-write
:Access: read-write
:Description: register with empty and no descriptions of the fields

+--------+--------------+---------+---------------+
Expand Down
5 changes: 4 additions & 1 deletion example/output/example.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
\widowctrl\hyphauto

{\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 Register description\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 example\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \par}
{\pard \ql \f0 \sa180 \li0 \fi0 Demo example used for the testing of the ipxact2systemverilog tool.\par}
{\pard \ql \f0 \sa0 \li0 \fi0 Base Address\par}
{\pard \ql \f0 \sa180 \li360 \fi0 0x0\sa180\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Registers\par}
{
\trowd \trgaph120
Expand Down
8 changes: 7 additions & 1 deletion example/output_default/example.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

# Register description
# example


Demo example used for the testing of the ipxact2systemverilog tool.

Base Address: 0x0


## Registers

Expand Down
Loading