Skip to content

Commit e308b57

Browse files
committed
typo
1 parent cac8fbc commit e308b57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/synth/yosys.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ func attemptYosysSynth(
183183
}
184184

185185
// Add optimization passes if requested
186-
switch rand.Intn(5) {
186+
switch rand.Intn(15) {
187187
case 0:
188188
yosysScript += "; proc; opt; fsm; opt; memory; opt; techmap; opt"
189189
case 1:
190190
yosysScript += "; synth"
191-
case 2, 3, 4:
191+
default:
192192
// select a random number of optimisations and apply them in a random order from the YOSYS_OPTIMISATON slice
193193
numOptimizations := rand.Intn(len(YOSYS_OPTIMISATIONS)) + 1
194194
rand.Shuffle(len(YOSYS_OPTIMISATIONS), func(i, j int) {
@@ -226,7 +226,7 @@ func attemptYosysSynth(
226226
return fmt.Errorf("yosys %s synthesis failed: %v - %s", synthType, err, stderr.String())
227227
}
228228
// add a comment with the Yosys script used at the top of the generated file at outputPath
229-
comment := fmt.Sprintf("// Yosys script used:\n%s\n", yosysScript)
229+
comment := fmt.Sprintf("// Yosys script used:\n// %s\n", yosysScript)
230230
if err := utils.PrependToFile(outputPath, comment); err != nil {
231231
return fmt.Errorf("failed to add comment to output file: %v", err)
232232
}

0 commit comments

Comments
 (0)