Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
3fde36d9
Commit
3fde36d9
authored
Apr 24, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more portable basic enum test
parent
fc3e79dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
test/basic/enum.sv
+1
-1
test/basic/enum.v
+6
-6
No files found.
test/basic/enum.sv
View file @
3fde36d9
...
...
@@ -28,7 +28,7 @@ typedef enum [0:0] {
`define
PRINT
(
name
,
val
)
\
dummy
``
name
=
name
``
_
``
val
;
\
$
display
("%
010x
%
010x
%
02d
%
02
d
",
\
$
display
("%
h
%
h
%
0d
%
0
d
",
\
name
``
_
``
val
,
dummy
``
name
,
$
bits
(
name
``
_
``
val
),
$
bits
(
dummy
``
name
))
;
module
top
;
...
...
test/basic/enum.v
View file @
3fde36d9
`define
PRINT
(
name
,
val
)
\
$
display
(
"%
010x %010x %02d %02
d"
,
\
$
display
(
"%
h %h %0d %0
d"
,
\
val
,
val
,
$
bits
(
dummy
`
`name
)
,
$
bits
(
dummy
`
`name
))
;
module
top
;
...
...
@@ -9,7 +9,7 @@ module top;
reg
[
31
:
0
]
dummyC
;
reg
[
31
:
0
]
dummyD
;
reg
[
31
:
0
]
dummyE
;
reg
dummyF
;
reg
[
0
:
0
]
dummyF
;
reg
[
0
:
0
]
dummyG
;
initial
begin
...
...
@@ -45,11 +45,11 @@ module top;
`PRINT
(
E
,
2
)
`PRINT
(
E
,
3
)
`PRINT
(
F
,
0
)
`PRINT
(
F
,
1
)
`PRINT
(
F
,
1'b
0
)
`PRINT
(
F
,
1
'b1
)
`PRINT
(
G
,
0
)
`PRINT
(
G
,
1
)
`PRINT
(
G
,
1'b
0
)
`PRINT
(
G
,
1
'b1
)
end
endmodule
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment