-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix 1364-2001 and 1364-2001-noconfig keywords mixup
- swap 1364-2001 and 1364-2001-noconfig - fix existing begin_keywords test - add keyword test suite for all keywords
- Loading branch information
Showing
12 changed files
with
328 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
always | ||
and | ||
assign | ||
begin | ||
buf | ||
bufif0 | ||
bufif1 | ||
case | ||
casex | ||
casez | ||
cmos | ||
deassign | ||
default | ||
defparam | ||
disable | ||
edge | ||
else | ||
end | ||
endcase | ||
endfunction | ||
endmodule | ||
endprimitive | ||
endspecify | ||
endtable | ||
endtask | ||
event | ||
for | ||
force | ||
forever | ||
fork | ||
function | ||
highz0 | ||
highz1 | ||
if | ||
ifnone | ||
initial | ||
inout | ||
input | ||
integer | ||
join | ||
large | ||
macromodule | ||
medium | ||
module | ||
nand | ||
negedge | ||
nmos | ||
nor | ||
not | ||
notif0 | ||
notif1 | ||
or | ||
output | ||
parameter | ||
pmos | ||
posedge | ||
primitive | ||
pull0 | ||
pull1 | ||
pulldown | ||
pullup | ||
rcmos | ||
real | ||
realtime | ||
reg | ||
release | ||
repeat | ||
rnmos | ||
rpmos | ||
rtran | ||
rtranif0 | ||
rtranif1 | ||
scalared | ||
small | ||
specify | ||
specparam | ||
strong0 | ||
strong1 | ||
supply0 | ||
supply1 | ||
table | ||
task | ||
time | ||
tran | ||
tranif0 | ||
tranif1 | ||
tri | ||
tri0 | ||
tri1 | ||
triand | ||
trior | ||
trireg | ||
vectored | ||
wait | ||
wand | ||
weak0 | ||
weak1 | ||
while | ||
wire | ||
wor | ||
xnor | ||
xor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
automatic | ||
endgenerate | ||
generate | ||
genvar | ||
localparam | ||
noshowcancelled | ||
pulsestyle_ondetect | ||
pulsestyle_onevent | ||
showcancelled | ||
signed | ||
unsigned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cell | ||
config | ||
design | ||
endconfig | ||
incdir | ||
include | ||
instance | ||
liblist | ||
library | ||
use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
uwire |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
alias | ||
always_comb | ||
always_ff | ||
always_latch | ||
assert | ||
assume | ||
before | ||
bind | ||
bins | ||
binsof | ||
bit | ||
break | ||
byte | ||
chandle | ||
class | ||
clocking | ||
const | ||
constraint | ||
context | ||
continue | ||
cover | ||
covergroup | ||
coverpoint | ||
cross | ||
dist | ||
do | ||
endclass | ||
endclocking | ||
endgroup | ||
endinterface | ||
endpackage | ||
endprogram | ||
endproperty | ||
endsequence | ||
enum | ||
expect | ||
export | ||
extends | ||
extern | ||
final | ||
first_match | ||
foreach | ||
forkjoin | ||
iff | ||
ignore_bins | ||
illegal_bins | ||
import | ||
inside | ||
int | ||
interface | ||
intersect | ||
join_any | ||
join_none | ||
local | ||
logic | ||
longint | ||
matches | ||
modport | ||
new | ||
null | ||
package | ||
packed | ||
priority | ||
program | ||
property | ||
protected | ||
pure | ||
rand | ||
randc | ||
randcase | ||
randsequence | ||
ref | ||
return | ||
sequence | ||
shortint | ||
shortreal | ||
solve | ||
static | ||
string | ||
struct | ||
super | ||
tagged | ||
this | ||
throughout | ||
timeprecision | ||
timeunit | ||
type | ||
typedef | ||
union | ||
unique | ||
var | ||
virtual | ||
void | ||
wait_order | ||
wildcard | ||
with | ||
within |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
accept_on | ||
checker | ||
endchecker | ||
eventually | ||
global | ||
implies | ||
let | ||
nexttime | ||
reject_on | ||
restrict | ||
s_always | ||
s_eventually | ||
s_nexttime | ||
s_until | ||
s_until_with | ||
strong | ||
sync_accept_on | ||
sync_reject_on | ||
unique0 | ||
until | ||
until_with | ||
untyped | ||
weak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
implements | ||
interconnect | ||
nettype | ||
soft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
VERSIONS=( | ||
1364-1995 | ||
1364-2001-noconfig | ||
1364-2001 | ||
1364-2005 | ||
1800-2005 | ||
1800-2009 | ||
1800-2012 | ||
) | ||
|
||
testKeyword() { | ||
sv2v_exit_code=$1 | ||
ivl_exit_code=$(($1*2)) | ||
version=$2 | ||
keyword=$3 | ||
|
||
source="\`begin_keywords \"$version\"\nmodule $keyword;endmodule\n\`end_keywords" | ||
|
||
$SV2V <(echo -e "$source") >/dev/null 2>/dev/null | ||
assertTrue "unexpected sv2v exit code $?" "[ $sv2v_exit_code -eq $? ]" | ||
|
||
iverilog -g2012 -o/dev/null <(echo -e "$source") >/dev/null 2>/dev/null | ||
assertTrue "unexpected ivl exit code $?" "[ $ivl_exit_code -eq $? ]" | ||
} | ||
|
||
addTest() { | ||
test="$1_$2_$3" | ||
eval "$test() { testKeyword $1 $2 $3; }" | ||
suite_addTest $test | ||
} | ||
|
||
addTests() { | ||
prev= | ||
for curr in "${VERSIONS[@]}"; do | ||
# This isn't a keyword in prior version. | ||
[ -n "$prev" -a $curr = $version ] && \ | ||
addTest 0 $prev $keyword && \ | ||
break | ||
prev=$curr | ||
done | ||
# This is a keyword in the specified version. | ||
addTest 1 $version $keyword | ||
} | ||
|
||
suite() { | ||
for version in "${VERSIONS[@]}"; do | ||
while read keyword; do | ||
addTests | ||
done < $version.txt | ||
done | ||
} | ||
|
||
source ../lib/functions.sh | ||
|
||
. shunit2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters