mirror of
https://github.com/supleed2/ELEC60015-HLP-CW.git
synced 2024-12-22 13:35:50 +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
|
||||
H : int
|
||||
W : int
|
||||
D : int list
|
||||
}
|
||||
|
||||
/// 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)
|
||||
H = h
|
||||
W = w
|
||||
D = [0]
|
||||
}
|
||||
|
||||
createComponent' characteristics label
|
||||
|
|
|
@ -423,7 +423,7 @@ let viewSelectedComponent (model: ModelType.Model) dispatch : ReactElement =
|
|||
dispatch (ReloadSelectedComponent model.LastUsedDialogWidth) // reload the new component
|
||||
)
|
||||
// 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 =
|
||||
sym.APortOffsetsMap
|
||||
|> Map.toList
|
||||
|
|
Loading…
Reference in a new issue