Skip to content

Commit

Permalink
Merge pull request #512 from iwbnwif/current
Browse files Browse the repository at this point in the history
Add 'wait for' clause to output-only VHDL models
  • Loading branch information
ra3xdh authored Jan 31, 2024
2 parents a51fa97 + 384af58 commit cf555f6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions qucs/components/logic_0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ QString logic_0::vhdlCode( int )
s = "\n " + Name + ":process\n" +
" begin\n " +
LO + " <= '0';\n" +
" wait for 1 ns;\n" +
" end process;\n";
return s;
}
Expand Down
1 change: 1 addition & 0 deletions qucs/components/logic_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ QString logic_1::vhdlCode( int )
s = "\n " + Name + ":process\n" +
" begin\n " +
L1 + " <= '1';\n" +
" wait for 1 ns;\n" +
" end process;\n";
return s;
}
Expand Down
3 changes: 2 additions & 1 deletion qucs/components/pad2bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ QString pad2bit::vhdlCode( int )
" when 3 => "+A+" <= '1'; "+B+" <= '1';\n" +
" when others => null;\n" +
" end case;\n";
s3 = " end process;\n";
s3 = " wait for 1 ns;\n"
" end process;\n";
s = s1+s2+s3;
return s;
}
Expand Down
3 changes: 2 additions & 1 deletion qucs/components/pad3bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ QString pad3bit::vhdlCode( int )
" when 7 => "+A+" <= '1'; "+B+" <= '1'; "+C+" <= '1';\n"+
" when others => null;\n" +
" end case;\n";
s3 = " end process;\n";
s3 = " wait for 1 ns;\n"
" end process;\n";
s = s1+s2+s3;
return s;
}
Expand Down
3 changes: 2 additions & 1 deletion qucs/components/pad4bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ QString pad4bit::vhdlCode( int )
" when 15 => "+A+" <= '1'; "+B+" <= '1'; "+C+" <= '1'; "+D+" <= '1';\n"+
" when others => null;\n"
" end case;\n";
s3 = " end process;\n";
s3 = " wait for 1 ns;\n"
" end process;\n";
s = s1+s2+s3;
return s;
}
Expand Down

0 comments on commit cf555f6

Please sign in to comment.