Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hdltbgen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMES
Public
XiBIF
hdltbgen
Commits
718aab8d
Commit
718aab8d
authored
8 months ago
by
Lukas Leuenberger
Browse files
Options
Downloads
Patches
Plain Diff
Small fixes in VHDL generation
parent
8cd38265
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
hdltbgen/__main__.py
+1
-1
1 addition, 1 deletion
hdltbgen/__main__.py
hdltbgen/generator/templates/vhdl.j2
+2
-2
2 additions, 2 deletions
hdltbgen/generator/templates/vhdl.j2
hdltbgen/hdldict/hdldict.py
+8
-3
8 additions, 3 deletions
hdltbgen/hdldict/hdldict.py
with
11 additions
and
6 deletions
hdltbgen/__main__.py
+
1
−
1
View file @
718aab8d
...
...
@@ -23,7 +23,7 @@ def main():
parser
=
generate_parser
()
args
=
parser
.
parse_args
()
print
(
args
)
#
print(args)
# Get the arguments
clock
=
getattr
(
args
,
'
clock
'
,
[])
...
...
This diff is collapsed.
Click to expand it.
hdltbgen/generator/templates/vhdl.j2
+
2
−
2
View file @
718aab8d
...
...
@@ -157,13 +157,13 @@ architecture tb of {{ hdl.entity_name }}_tb is
-- This function converts a std_logic value into a string.
function to_string_std_logic(value : std_logic) return string is -- @suppress
begin
return
MVL9_TO_CHAR_C(
std_
u
logic(value)
)
;
return std_logic
'image
(value);
end function to_string_std_logic;
-- This function converts a std_ulogic value into a string.
function to_string_std_ulogic(value : std_ulogic) return string is -- @suppress
begin
return
MVL9_TO_CHAR_C
(value);
return
std_ulogic'image
(value);
end function to_string_std_ulogic;
begin
...
...
This diff is collapsed.
Click to expand it.
hdltbgen/hdldict/hdldict.py
+
8
−
3
View file @
718aab8d
...
...
@@ -40,7 +40,7 @@ class hdldict():
port_ele_clk
.
direction
=
"
in
"
port_ele_clk
.
type
=
"
std_logic
"
port_ele_clk
.
virtual
=
True
self
.
add_port
(
port_ele_clk
)
self
.
add_port
(
port_ele_clk
,
True
)
self
.
_clock
.
append
(
port_ele_clk
.
name
)
# try to find a reset in the port list
...
...
@@ -164,12 +164,17 @@ class hdldict():
"""
return
self
.
_params
def
add_port
(
self
,
new_port
):
def
add_port
(
self
,
new_port
,
front
=
False
):
"""
Add a new port.
:param new_port: New port to add
:type new_port: hdlport
:param front: Add to the front of the list
:type front: bool
"""
if
front
:
self
.
_ports
.
insert
(
0
,
new_port
)
else
:
self
.
_ports
.
append
(
new_port
)
def
add_param
(
self
,
new_param
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment