diff options
| author | jackkoenig | 2016-09-22 22:38:33 -0700 |
|---|---|---|
| committer | jackkoenig | 2016-11-18 11:05:33 -0800 |
| commit | 822160cc8e76e70643fb56707bb39f6f7526b6fd (patch) | |
| tree | 50b9e132c6e7d2d5113195683ef3cc3fc5fc1113 /src/test/resources | |
| parent | 6929ca0fc64b562f4852a49df617a1836e083563 (diff) | |
Add support for parameterized BlackBoxes
Also restrict black boxes to not allow hardware inside of them since it was
being silently dropped anyway.
Resolves #289
Diffstat (limited to 'src/test/resources')
| -rw-r--r-- | src/test/resources/BlackBoxTest.v | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/resources/BlackBoxTest.v b/src/test/resources/BlackBoxTest.v index 910b09ff..edf321a8 100644 --- a/src/test/resources/BlackBoxTest.v +++ b/src/test/resources/BlackBoxTest.v @@ -32,3 +32,28 @@ module BlackBoxConstant #( ); assign out = VALUE; endmodule + +module BlackBoxStringParam #( + parameter string STRING = "zero" +) ( + output [31:0] out +); + assign out = (STRING == "one" )? 1 : + (STRING == "two" )? 2 : 0; +endmodule + +module BlackBoxRealParam #( + parameter real REAL = 0.0 +) ( + output [63:0] out +); + assign out = $realtobits(REAL); +endmodule + +module BlackBoxTypeParam #( + parameter type T = bit +) ( + output T out +); + assign out = 32'hdeadbeef; +endmodule |
