mirror of https://github.com/zachjs/sv2v.git
fix indentation inconsistencies
This commit is contained in:
parent
e9d62e01ad
commit
2b9fff78e7
|
|
@ -256,42 +256,42 @@ instance Show DriveStrength where
|
||||||
show (DriveStrength s0 s1) = printf "(%s, %s)" (show s0) (show s1)
|
show (DriveStrength s0 s1) = printf "(%s, %s)" (show s0) (show s1)
|
||||||
|
|
||||||
data Strength0
|
data Strength0
|
||||||
= Supply0
|
= Supply0
|
||||||
| Strong0
|
| Strong0
|
||||||
| Pull0
|
| Pull0
|
||||||
| Weak0
|
| Weak0
|
||||||
| Highz0
|
| Highz0
|
||||||
deriving (Eq, Ord)
|
deriving (Eq, Ord)
|
||||||
|
|
||||||
instance Show Strength0 where
|
instance Show Strength0 where
|
||||||
show Supply0 = "supply0"
|
show Supply0 = "supply0"
|
||||||
show Strong0 = "strong0"
|
show Strong0 = "strong0"
|
||||||
show Pull0 = "pull0"
|
show Pull0 = "pull0"
|
||||||
show Weak0 = "weak0"
|
show Weak0 = "weak0"
|
||||||
show Highz0 = "highz0"
|
show Highz0 = "highz0"
|
||||||
|
|
||||||
data Strength1
|
data Strength1
|
||||||
= Supply1
|
= Supply1
|
||||||
| Strong1
|
| Strong1
|
||||||
| Pull1
|
| Pull1
|
||||||
| Weak1
|
| Weak1
|
||||||
| Highz1
|
| Highz1
|
||||||
deriving (Eq, Ord)
|
deriving (Eq, Ord)
|
||||||
|
|
||||||
instance Show Strength1 where
|
instance Show Strength1 where
|
||||||
show Supply1 = "supply1"
|
show Supply1 = "supply1"
|
||||||
show Strong1 = "strong1"
|
show Strong1 = "strong1"
|
||||||
show Pull1 = "pull1"
|
show Pull1 = "pull1"
|
||||||
show Weak1 = "weak1"
|
show Weak1 = "weak1"
|
||||||
show Highz1 = "highz1"
|
show Highz1 = "highz1"
|
||||||
|
|
||||||
data ChargeStrength
|
data ChargeStrength
|
||||||
= Small
|
= Small
|
||||||
| Medium
|
| Medium
|
||||||
| Large
|
| Large
|
||||||
deriving (Eq, Ord)
|
deriving (Eq, Ord)
|
||||||
|
|
||||||
instance Show ChargeStrength where
|
instance Show ChargeStrength where
|
||||||
show Small = "(small)"
|
show Small = "(small)"
|
||||||
show Medium = "(medium)"
|
show Medium = "(medium)"
|
||||||
show Large = "(large)"
|
show Large = "(large)"
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ popCondStack directive = do
|
||||||
cs <- getCondStack
|
cs <- getCondStack
|
||||||
case cs of
|
case cs of
|
||||||
[] -> lexicalError $
|
[] -> lexicalError $
|
||||||
"`" ++ directive ++ " directive outside of an `if/`endif block"
|
"`" ++ directive ++ " directive outside of an `if/`endif block"
|
||||||
c : cs' -> setCondStack cs' >> return c
|
c : cs' -> setCondStack cs' >> return c
|
||||||
|
|
||||||
isIdentChar :: Char -> Bool
|
isIdentChar :: Char -> Bool
|
||||||
|
|
|
||||||
|
|
@ -1,46 +1,46 @@
|
||||||
module top;
|
module top;
|
||||||
initial begin
|
initial begin
|
||||||
// generated by running a commercial simulator
|
// generated by running a commercial simulator
|
||||||
$display("m_def 0 00000000000000000000000000000001 1");
|
$display("m_def 0 00000000000000000000000000000001 1");
|
||||||
$display("m_def 00 00000000000000000000000000000001 2");
|
$display("m_def 00 00000000000000000000000000000001 2");
|
||||||
$display("m_def 00 00000000000000000000000000000001 2");
|
$display("m_def 00 00000000000000000000000000000001 2");
|
||||||
$display("m_nodef 00 00000000000000000000000000000001 2");
|
$display("m_nodef 00 00000000000000000000000000000001 2");
|
||||||
$display("m_nodef 00 00000000000000000000000000000001 2");
|
$display("m_nodef 00 00000000000000000000000000000001 2");
|
||||||
$display("n_nodef 00 00000000000000000000000000000001 2");
|
$display("n_nodef 00 00000000000000000000000000000001 2");
|
||||||
$display("n_nodef 001 00000000000000000000000000000010 3");
|
$display("n_nodef 001 00000000000000000000000000000010 3");
|
||||||
$display("n_nodef 00 00000000000000000000000000000001 2");
|
$display("n_nodef 00 00000000000000000000000000000001 2");
|
||||||
$display("n_nodef 1 00000000000000000000000000000010 1");
|
$display("n_nodef 1 00000000000000000000000000000010 1");
|
||||||
$display("n_nodef 00 00000000000000000000000000000001 2");
|
$display("n_nodef 00 00000000000000000000000000000001 2");
|
||||||
$display("n_nodef 1 00000000000000000000000000000010 1");
|
$display("n_nodef 1 00000000000000000000000000000010 1");
|
||||||
$display("n_def 00 00000000000000000000000000000001 2");
|
$display("n_def 00 00000000000000000000000000000001 2");
|
||||||
$display("n_def 001 00000000000000000000000000000010 3");
|
$display("n_def 001 00000000000000000000000000000010 3");
|
||||||
$display("n_def 00 00000000000000000000000000000001 2");
|
$display("n_def 00 00000000000000000000000000000001 2");
|
||||||
$display("n_def 1 00000000000000000000000000000010 1");
|
$display("n_def 1 00000000000000000000000000000010 1");
|
||||||
$display("n_def 0 00000000000000000000000000000001 1");
|
$display("n_def 0 00000000000000000000000000000001 1");
|
||||||
$display("n_def 01 00000000000000000000000000000010 2");
|
$display("n_def 01 00000000000000000000000000000010 2");
|
||||||
$display("n_def 00 00000000000000000000000000000001 2");
|
$display("n_def 00 00000000000000000000000000000001 2");
|
||||||
$display("n_def 1 00000000000000000000000000000010 1");
|
$display("n_def 1 00000000000000000000000000000010 1");
|
||||||
$display("n_def 0 00000000000000000000000000000001 1");
|
$display("n_def 0 00000000000000000000000000000001 1");
|
||||||
$display("n_def 1 00000000000000000000000000000010 1");
|
$display("n_def 1 00000000000000000000000000000010 1");
|
||||||
$display("n_tdef 00 00000000000000000000000000000001 2");
|
$display("n_tdef 00 00000000000000000000000000000001 2");
|
||||||
$display("n_tdef 001 00000000000000000000000000000010 3");
|
$display("n_tdef 001 00000000000000000000000000000010 3");
|
||||||
$display("n_tdef 00 00000000000000000000000000000001 2");
|
$display("n_tdef 00 00000000000000000000000000000001 2");
|
||||||
$display("n_tdef 1 00000000000000000000000000000010 1");
|
$display("n_tdef 1 00000000000000000000000000000010 1");
|
||||||
$display("n_tdef 00 00000000000000000000000000000001 2");
|
$display("n_tdef 00 00000000000000000000000000000001 2");
|
||||||
$display("n_tdef 1 00000000000000000000000000000010 1");
|
$display("n_tdef 1 00000000000000000000000000000010 1");
|
||||||
$display("n_nodef a= 1 01 00000000000000000000000000000010 2");
|
$display("n_nodef a= 1 01 00000000000000000000000000000010 2");
|
||||||
$display("n_nodef b= 0 000 00000000000000000000000000000001 3");
|
$display("n_nodef b= 0 000 00000000000000000000000000000001 3");
|
||||||
$display("n_nodef a= 0 00 00000000000000000000000000000001 2");
|
$display("n_nodef a= 0 00 00000000000000000000000000000001 2");
|
||||||
$display("n_nodef b= 1 1 00000000000000000000000000000010 1");
|
$display("n_nodef b= 1 1 00000000000000000000000000000010 1");
|
||||||
$display("n_nodef a= 0 00 00000000000000000000000000000001 2");
|
$display("n_nodef a= 0 00 00000000000000000000000000000001 2");
|
||||||
$display("n_nodef b= 1 001 00000000000000000000000000000010 3");
|
$display("n_nodef b= 1 001 00000000000000000000000000000010 3");
|
||||||
$display("n_nodef a= 1 01 00000000000000000000000000000010 2");
|
$display("n_nodef a= 1 01 00000000000000000000000000000010 2");
|
||||||
$display("n_nodef b= 0 0 00000000000000000000000000000001 1");
|
$display("n_nodef b= 0 0 00000000000000000000000000000001 1");
|
||||||
$display("p 00 00000000000000000000000000000001 2");
|
$display("p 00 00000000000000000000000000000001 2");
|
||||||
$display("p 001 00000000000000000000000000000010 3");
|
$display("p 001 00000000000000000000000000000010 3");
|
||||||
$display("p 0 00000000000000000000000000000001 1");
|
$display("p 0 00000000000000000000000000000001 1");
|
||||||
$display("p 1 00000000000000000000000000000010 1");
|
$display("p 1 00000000000000000000000000000010 1");
|
||||||
$display("p 000 00000000000000000000000000000001 3");
|
$display("p 000 00000000000000000000000000000001 3");
|
||||||
$display("p 001 00000000000000000000000000000010 3");
|
$display("p 001 00000000000000000000000000000010 3");
|
||||||
end
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module top;
|
module top;
|
||||||
parameter foo_1 = { 3'b010, 2'b01, 4'b0000 };
|
parameter foo_1 = { 3'b010, 2'b01, 4'b0000 };
|
||||||
parameter foo_0 = { 3'b001, 2'b00, 4'b0010 };
|
parameter foo_0 = { 3'b001, 2'b00, 4'b0010 };
|
||||||
initial begin
|
initial begin
|
||||||
$display(foo_0);
|
$display(foo_0);
|
||||||
$display(foo_1);
|
$display(foo_1);
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,28 @@
|
||||||
typedef union packed {
|
typedef union packed {
|
||||||
logic [4:0] x;
|
logic [4:0] x;
|
||||||
logic [4:0] y;
|
logic [4:0] y;
|
||||||
} A;
|
} A;
|
||||||
|
|
||||||
typedef union packed {
|
typedef union packed {
|
||||||
logic [4:0] x;
|
logic [4:0] x;
|
||||||
logic [0:4] y;
|
logic [0:4] y;
|
||||||
} B;
|
} B;
|
||||||
|
|
||||||
typedef union packed {
|
typedef union packed {
|
||||||
logic [4:0] x;
|
logic [4:0] x;
|
||||||
logic [1:5] y;
|
logic [1:5] y;
|
||||||
} C;
|
} C;
|
||||||
|
|
||||||
typedef union packed {
|
typedef union packed {
|
||||||
logic [4:0] x;
|
logic [4:0] x;
|
||||||
struct packed {
|
struct packed {
|
||||||
logic [2:0] a;
|
logic [2:0] a;
|
||||||
logic [1:0] b;
|
logic [1:0] b;
|
||||||
} y;
|
} y;
|
||||||
struct packed {
|
struct packed {
|
||||||
logic [1:0] a;
|
logic [1:0] a;
|
||||||
logic [0:2] b;
|
logic [0:2] b;
|
||||||
} z;
|
} z;
|
||||||
} D;
|
} D;
|
||||||
|
|
||||||
module wrap;
|
module wrap;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
`define FANCY_SEEING_YOU 1337
|
`define FANCY_SEEING_YOU 1337
|
||||||
package pkg;
|
package pkg;
|
||||||
function automatic integer width_calc;
|
function automatic integer width_calc;
|
||||||
input integer a;
|
input integer a;
|
||||||
return a+3;
|
return a+3;
|
||||||
endfunction
|
endfunction
|
||||||
endpackage
|
endpackage
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue