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
1584f390
Commit
1584f390
authored
Sep 25, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow typename resolution of non-vector types
parent
111e04f8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
src/Convert/Typedef.hs
+2
-2
src/Language/SystemVerilog/AST/Type.hs
+1
-0
test/basic/enum.sv
+8
-0
test/basic/enum.v
+4
-0
No files found.
src/Convert/Typedef.hs
View file @
1584f390
...
@@ -94,5 +94,5 @@ resolveType types (Alias Nothing st rs1) =
...
@@ -94,5 +94,5 @@ resolveType types (Alias Nothing st rs1) =
(
Union
p
l
rs2
)
->
Union
p
l
$
rs1
++
rs2
(
Union
p
l
rs2
)
->
Union
p
l
$
rs1
++
rs2
(
InterfaceT
x
my
rs2
)
->
InterfaceT
x
my
$
rs1
++
rs2
(
InterfaceT
x
my
rs2
)
->
InterfaceT
x
my
$
rs1
++
rs2
(
Alias
ps
x
rs2
)
->
Alias
ps
x
$
rs1
++
rs2
(
Alias
ps
x
rs2
)
->
Alias
ps
x
$
rs1
++
rs2
(
IntegerAtom
kw
_
)
->
error
$
"resolveType encountered packed `"
++
(
show
kw
)
++
"` on "
++
st
(
IntegerAtom
kw
sg
)
->
nullRange
(
IntegerAtom
kw
sg
)
rs1
(
NonInteger
kw
)
->
error
$
"resolveType encountered packed `"
++
(
show
kw
)
++
"` on "
++
st
(
NonInteger
kw
)
->
nullRange
(
NonInteger
kw
)
rs1
src/Language/SystemVerilog/AST/Type.hs
View file @
1584f390
...
@@ -17,6 +17,7 @@ module Language.SystemVerilog.AST.Type
...
@@ -17,6 +17,7 @@ module Language.SystemVerilog.AST.Type
,
IntegerAtomType
(
..
)
,
IntegerAtomType
(
..
)
,
NonIntegerType
(
..
)
,
NonIntegerType
(
..
)
,
typeRanges
,
typeRanges
,
nullRange
)
where
)
where
import
Text.Printf
(
printf
)
import
Text.Printf
(
printf
)
...
...
test/basic/enum.sv
View file @
1584f390
...
@@ -31,6 +31,10 @@ typedef enum Foo_t {
...
@@ -31,6 +31,10 @@ typedef enum Foo_t {
H_1
=
'b1
,
H_2
=
'b0
H_1
=
'b1
,
H_2
=
'b0
}
EnumH
;
}
EnumH
;
typedef
enum
int
{
I_1
,
I_2
}
EnumI
;
`define
PRINT
(
name
,
val
)
\
`define
PRINT
(
name
,
val
)
\
dummy
``
name
=
name
``
_
``
val
;
\
dummy
``
name
=
name
``
_
``
val
;
\
$
display
("%
h
%
h
%
0d
%
0d
",
\
$
display
("%
h
%
h
%
0d
%
0d
",
\
...
@@ -50,6 +54,7 @@ module top;
...
@@ -50,6 +54,7 @@ module top;
EnumF
dummyF
;
EnumF
dummyF
;
EnumG
dummyG
;
EnumG
dummyG
;
EnumH
dummyH
;
EnumH
dummyH
;
EnumI
dummyI
;
initial
begin
initial
begin
...
@@ -85,5 +90,8 @@ module top;
...
@@ -85,5 +90,8 @@ module top;
`PRINT_UNSIZED
(
H
,
1
)
`PRINT_UNSIZED
(
H
,
1
)
`PRINT_UNSIZED
(
H
,
2
)
`PRINT_UNSIZED
(
H
,
2
)
`PRINT_UNSIZED
(
I
,
1
)
`PRINT_UNSIZED
(
I
,
2
)
end
end
endmodule
endmodule
test/basic/enum.v
View file @
1584f390
...
@@ -18,6 +18,7 @@ module top;
...
@@ -18,6 +18,7 @@ module top;
reg
[
0
:
0
]
dummyF
;
reg
[
0
:
0
]
dummyF
;
reg
[
0
:
0
]
dummyG
;
reg
[
0
:
0
]
dummyG
;
reg
[
3
:
0
]
dummyH
;
reg
[
3
:
0
]
dummyH
;
reg
[
31
:
0
]
dummyI
;
initial
begin
initial
begin
...
@@ -53,6 +54,9 @@ module top;
...
@@ -53,6 +54,9 @@ module top;
`PRINT_UNSIZED
(
H
,
'b1
)
`PRINT_UNSIZED
(
H
,
'b1
)
`PRINT_UNSIZED
(
H
,
'b0
)
`PRINT_UNSIZED
(
H
,
'b0
)
`PRINT_UNSIZED
(
I
,
'b0
)
`PRINT_UNSIZED
(
I
,
'b1
)
end
end
endmodule
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