Skip to content

Commit c6295b8

Browse files
Fix INST Parameter Format
1 parent 88d419e commit c6295b8

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88

99
# macOS
1010
.DS_Store
11+
12+
# This Project
13+
/private

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ name = "pytv"
33
description = "Python Templated Verilog"
44
repository = "https://github.com/autohdw/pytv"
55
authors = ["Teddy van Jerry <[email protected]>"]
6-
version = "0.5.2"
6+
version = "0.5.3"
77
readme = "README.md"
88
license = "GPL-3.0-or-later"
99
keywords = ["verilog", "python", "template", "generation"]
1010
categories = ["template-engine", "compilers", "development-tools"]
11-
exclude = ["examples/*", "target/*", "Cargo.lock", ".github/*", ".vscode/*", ".DS_Store"]
11+
exclude = [
12+
"examples/*",
13+
"target/*",
14+
"Cargo.lock",
15+
".github/*",
16+
".vscode/*",
17+
".DS_Store",
18+
"private/*",
19+
]
1220
edition = "2021"
1321

1422
[features]

src/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ impl Convert {
281281
" s = [' .%s(%s)' % tuple for tuple in tuples]\n",
282282
" return ('' if first_port else ',\\n') + ',\\n'.join(s)\n\n",
283283
"def _verilog_vparams_var_map(tuples, first_vparam):\n",
284-
" s = ['\\n parameter %s = %s' % tuple for tuple in tuples]\n",
284+
" s = ['\\n .%s(%s)' % tuple for tuple in tuples]\n",
285285
" return ('#(' if first_vparam else ',') + ','.join(s)\n",
286286
),
287287
self.output_inst_file_name()

src/inst.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl Convert {
140140
} else {
141141
writeln!(
142142
stream,
143-
"print(f'{}\\n parameter {} = {}', end='')",
143+
"print(f'{}\\n .{}({})', end='')",
144144
if first_vparam {
145145
first_vparam = false;
146146
"#("
@@ -161,7 +161,7 @@ impl Convert {
161161
}
162162
}
163163
if !first_vparam {
164-
writeln!(stream, "print(f')')")?;
164+
writeln!(stream, "print(')')")?;
165165
}
166166
match inst_map["name"].as_str() {
167167
Some(name) => writeln!(

0 commit comments

Comments
 (0)