You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update nix-eda to `0814aa6c`
* update nl2bench to 0.5.0 -- new pyosys-based version
* add experimental support for podemquest
Co-authored-by: Youssef Kandil <youssefkandil@aucegypt.edu>
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+
import ArgumentParser
15
16
import BigInt
16
17
import Collections
17
-
import ArgumentParser
18
-
import CoreFoundation // Not automatically imported on Linux
18
+
import CoreFoundation // Not automatically imported on Linux
19
19
import Defile
20
20
import Foundation
21
21
import PythonKit
22
22
import Yams
23
23
24
-
25
24
extensionFault{
26
25
structATPG:ParsableCommand{
27
26
staticletconfiguration=CommandConfiguration(
28
-
abstract:"Generate/import test vectors for a particular circuit and calculate coverage."
27
+
abstract:
28
+
"Generate/import test vectors for a particular circuit and calculate coverage."
29
+
)
30
+
31
+
@Option(
32
+
name:[.short,.long], help:"Path to the output JSON file. (Default: input + .tv.json)"
29
33
)
30
-
31
-
@Option(name:[.short,.long], help:"Path to the output JSON file. (Default: input + .tv.json)")
32
34
varoutput:String?
33
-
35
+
34
36
@Option(help:"Path to the output SVF file. (Default: input + .tv.svf)")
35
37
varoutputSvf:String?
36
-
37
-
@Option(name:[.long,.customLong("output-faultPoints")], help:"Path to the output yml file listing all generated fault points. (Default: nil)")
38
+
39
+
@Option(
40
+
name:[.long,.customLong("output-faultPoints")],
41
+
help:"Path to the output yml file listing all generated fault points. (Default: nil)")
38
42
varoutputFaultPoints:String?
39
-
40
-
@Option(name:[.long,.customLong("output-covered")], help:"Path to the output yml file listing coverage metadata, i.e., ratio and fault points covered. (Default: nil)")
43
+
44
+
@Option(
45
+
name:[.long,.customLong("output-covered")],
46
+
help:
47
+
"Path to the output yml file listing coverage metadata, i.e., ratio and fault points covered. (Default: nil)"
48
+
)
41
49
varoutputCoverageMetadata:String?
42
-
43
-
@Option(name:[.short,.long,.customLong("cellModel")], help:"A Verilog model with which standard cells can be simulated.")
50
+
51
+
@Option(
52
+
name:[.short,.long,.customLong("cellModel")],
53
+
help:"A Verilog model with which standard cells can be simulated.")
44
54
varcellModel:String
45
-
46
-
@Option(name:[.customShort("v"),.long], help:"Number of test vectors to generate in the first batch.")
55
+
56
+
@Option(
57
+
name:[.customShort("v"),.long],
58
+
help:"Number of test vectors to generate in the first batch.")
47
59
vartvCount:Int=100
48
-
49
-
@Option(name:[.customShort("r"),.long], help:"Increment in test vector count in subsequent batches should sufficient coverage not be reached.")
60
+
61
+
@Option(
62
+
name:[.customShort("r"),.long],
63
+
help:
64
+
"Increment in test vector count in subsequent batches should sufficient coverage not be reached."
65
+
)
50
66
varincrement:Int=50
51
-
52
-
@Option(name:[.short,.long], help:"The minimum coverage to reach before ceasing increments. If set to 0, only the initial batch is run.")
67
+
68
+
@Option(
69
+
name:[.short,.long],
70
+
help:
71
+
"The minimum coverage to reach before ceasing increments. If set to 0, only the initial batch is run."
72
+
)
53
73
varminCoverage:Float=80
54
-
55
-
@Option(help:"Ceiling for Test Vector increments: if this number is reached, no more increments will occur regardless the coverage.")
74
+
75
+
@Option(
76
+
help:
77
+
"Ceiling for Test Vector increments: if this number is reached, no more increments will occur regardless the coverage."
78
+
)
56
79
varceiling:Int?
57
-
80
+
58
81
@Option(help:"Type of the pseudo-random internal test-vector-generator.")
59
82
vartvGen:String="swift"
60
-
61
-
@Option(help:"A \(MemoryLayout<UInt>.size)-byte value to use as an RNG seed for test vector generators, provided as a hexadecimal string (without 0x).")
83
+
84
+
@Option(
85
+
help:
86
+
"A \(MemoryLayout<UInt>.size)-byte value to use as an RNG seed for test vector generators, provided as a hexadecimal string (without 0x)."
87
+
)
62
88
varrngSeed:String="DEADCAFEDEADF00D"
63
-
64
-
@Option(name:[.customShort("g"),.long], help:"Use an external TV Generator: Atalanta or PODEM.")
89
+
90
+
@Option(
91
+
name:[.customShort("g"),.long],
92
+
help:"Use an external TV Generator: Atalanta or PODEM.")
65
93
varetvGen:String?
66
-
67
-
@Option(name:[.short,.long], help:"Netlist in bench format. (Required iff generator is set to Atalanta or PODEM.)")
94
+
95
+
@Option(
96
+
name:[.short,.long],
97
+
help:"Netlist in bench format. (Required iff generator is set to Atalanta or PODEM.)")
68
98
varbench:String?
69
-
99
+
70
100
@Flag(help:"Generate only one testbench for inspection, and do not delete it.")
71
101
varsampleRun:Bool=false
72
-
102
+
73
103
@OptionGroup
74
104
varbypass:BypassOptions
75
-
76
-
@Option(help:"If provided, this JSON file's test vectors are simulated and no generation is attempted.")
77
-
varexternalTVSet:String?
78
-
79
-
@Option(help:"If provided, this JSON file's test vector are used as the initial set of test vectors, with iterations taking place with them in mind.")
105
+
106
+
@Option(
107
+
help:
108
+
"If provided, this JSON file's test vector are used as the initial set of test vectors, with iterations taking place with them in mind."
109
+
)
80
110
variteratingUpon:String?
81
-
82
-
@Option(name:[.customShort("D"),.customLong("define")], help:"Define statements to include during simulations.")
111
+
112
+
@Option(
113
+
name:[.customShort("D"),.customLong("define")],
114
+
help:"Define statements to include during simulations.")
83
115
vardefines:[String]=[]
84
-
85
-
@Option(name:[.customShort("I"),.customLong("include")], help:"Extra verilog models to include during simulations.")
116
+
117
+
@Option(
118
+
name:[.customShort("I"),.customLong("include")],
119
+
help:"Extra verilog models to include during simulations.")
86
120
varincludes:[String]=[]
87
-
121
+
88
122
@Argument(help:"The cutaway netlist to generate patterns for.")
89
123
varfile:String
90
-
124
+
91
125
mutatingfunc run()throws{
92
-
126
+
93
127
if !TVGeneratorFactory.validNames.contains(tvGen){
0 commit comments