Skip to content

Commit

Permalink
Merge pull request #137 from nturley/master
Browse files Browse the repository at this point in the history
fix bug in test_custom tests
  • Loading branch information
jandecaluwe committed Nov 29, 2015
2 parents 480d228 + bb2ba3c commit fb70bb2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions myhdl/test/conversion/toVHDL/test_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def incProcess():
__vhdl__ = \
"""
process (%(clock)s, %(reset)s) begin
if (reset = '0') then
if (%(reset)s = '0') then
%(count)s <= (others => '0');
elsif rising_edge(%(clock)s) then
if (enable = '1') then
if (%(enable)s = '1') then
%(count)s <= (%(count)s + 1) mod %(n)s;
end if;
end if;
Expand All @@ -104,11 +104,11 @@ def incProcess():
__vhdl__ = \
"""
always @(posedge %(clock)s, negedge %(reset)s) begin
if (reset == 0) begin
if (%(reset)s == 0) begin
%(count)s <= 0;
end
else begin
if (enable) begin
if (%(enable)s) begin
%(count)s <= (%(countq)s + 1) %% %(n)s;
end
end
Expand Down Expand Up @@ -151,10 +151,10 @@ def logic():
__vhdl__ = \
"""
process (%(clock)s, %(reset)s) begin
if (reset = '0') then
if (%(reset)s = '0') then
%(count)s <= (others => '0');
elsif rising_edge(%(clock)s) then
if (enable = '1') then
if (%(enable)s = '1') then
%(count)s <= %(nextCount)s;
end if;
end if;
Expand Down
12 changes: 6 additions & 6 deletions myhdl/test/conversion/toVHDL/test_newcustom.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def incProcess():
inc.vhdl_code = \
"""
process ($clock, $reset) begin
if (reset = '0') then
if ($reset = '0') then
$count <= (others => '0');
elsif rising_edge($clock) then
if (enable = '1') then
if ($enable = '1') then
$count <= ($count + 1) mod $n;
end if;
end if;
Expand All @@ -104,11 +104,11 @@ def incProcess():
incErr.vhdl_code = \
"""
always @(posedge $clock, negedge $reset) begin
if (reset == 0) begin
if ($reset == 0) begin
$count <= 0;
end
else begin
if (enable) begin
if ($enable) begin
$count <= ($countq + 1) %% $n;
end
end
Expand Down Expand Up @@ -151,10 +151,10 @@ def logic():
inc_seq.vhdl_code = \
"""
process ($clock, $reset) begin
if (reset = '0') then
if ($reset = '0') then
$count <= (others => '0');
elsif rising_edge($clock) then
if (enable = '1') then
if ($enable = '1') then
$count <= $nextCount;
end if;
end if;
Expand Down

0 comments on commit fb70bb2

Please sign in to comment.