Skip to content

Commit

Permalink
fix: replace fastReduce with fastReduceFData in truthtable generation
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6770 committed Jul 16, 2023
1 parent 47fc042 commit fdd56a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Renderer/Simulator/Fast/FastRun.fs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ let private orderCombinationalComponentsFData (numSteps: int) (fs: FastSimulatio
readyToReduce <- fc' :: readyToReduce)

let init fc =
fastReduce 0 0 false fc
fastReduceFData 0 0 false fc
fc.Touched <- true
propagateEval fc

Expand All @@ -225,7 +225,7 @@ let private orderCombinationalComponentsFData (numSteps: int) (fs: FastSimulatio
fc.InputLinks[0].FDataStep
|> Array.iteri (fun i _ -> fc.InputLinks[0].FDataStep[ i ] <- Data(convertIntToFastData (fc.OutputWidth 0) 0u))
//printfn "Initialised input: %A" fc.InputLinks
fastReduce fs.MaxArraySize 0 false fc
fastReduceFData fs.MaxArraySize 0 false fc
fc.Touched <- true
propagateEval fc

Expand Down Expand Up @@ -278,7 +278,7 @@ let private orderCombinationalComponentsFData (numSteps: int) (fs: FastSimulatio

readyL
|> List.iter (fun fc ->
fastReduce fs.MaxArraySize 0 false fc // this is always a combinational reduction
fastReduceFData fs.MaxArraySize 0 false fc // this is always a combinational reduction
orderedComps <- fc :: orderedComps
fc.Touched <- true
propagateEval fc)
Expand Down Expand Up @@ -546,7 +546,7 @@ let private setSimulationInputFData (cid: ComponentId) (fd: FData) (step: int) (
/// input has changed
let private runCombinationalLogic (step: int) (fastSim: FastSimulation) =
fastSim.FOrderedComps
|> Array.iter (fastReduce fastSim.MaxArraySize step false)
|> Array.iter (fastReduceFData fastSim.MaxArraySize step false)

/// Change an input and make simulation correct. N.B. step must be the latest
/// time-step since future steps are not rerun (TODO: perhaps they should be!)
Expand Down

0 comments on commit fdd56a7

Please sign in to comment.