mirror of
https://github.com/supleed2/ELEC60015-HLP-CW.git
synced 2024-11-10 02:05:48 +00:00
Updated to include Component with D port int list.
This commit is contained in:
parent
64f5654fdc
commit
f658ba9a59
|
@ -319,6 +319,7 @@ module CommonTypes
|
||||||
Y : int
|
Y : int
|
||||||
H : int
|
H : int
|
||||||
W : int
|
W : int
|
||||||
|
D : int list
|
||||||
}
|
}
|
||||||
|
|
||||||
/// JSConnection mapped to F# record.
|
/// JSConnection mapped to F# record.
|
||||||
|
|
|
@ -285,6 +285,7 @@ let createComponent (pos: XYPos) (comptype: ComponentType) (id:string) (label:st
|
||||||
Y = int (pos.Y - float h / 2.0)
|
Y = int (pos.Y - float h / 2.0)
|
||||||
H = h
|
H = h
|
||||||
W = w
|
W = w
|
||||||
|
D = [0]
|
||||||
}
|
}
|
||||||
|
|
||||||
createComponent' characteristics label
|
createComponent' characteristics label
|
||||||
|
|
|
@ -423,7 +423,7 @@ let viewSelectedComponent (model: ModelType.Model) dispatch : ReactElement =
|
||||||
dispatch (ReloadSelectedComponent model.LastUsedDialogWidth) // reload the new component
|
dispatch (ReloadSelectedComponent model.LastUsedDialogWidth) // reload the new component
|
||||||
)
|
)
|
||||||
// Control when the namesPortRaw map can be accessed else return normal name of port
|
// Control when the namesPortRaw map can be accessed else return normal name of port
|
||||||
let allowedDescription = match comp.Type with | NbitsAdder _ | Decode4 | Register _ |DFF| RegisterE _ |DFFE| ROM1 _ |AsyncROM1 _ | RAM1 _ | AsyncRAM1 _ | Mux2 | Demux2 | NbitsXor _ | Custom _ -> true | _ -> false
|
let allowedDescription = match comp.Type with | Custom _ -> true | _ -> false
|
||||||
let ports =
|
let ports =
|
||||||
sym.APortOffsetsMap
|
sym.APortOffsetsMap
|
||||||
|> Map.toList
|
|> Map.toList
|
||||||
|
|
Loading…
Reference in a new issue