+; FR450 machine
+(define-mach
+ (name fr450)
+ (comment "FR450 cpu")
+ (cpu frvbf)
+)
+(define-model
+ (name fr450) (comment "FR450 model") (attrs)
+ (mach fr450)
+ (pipeline all "" () ((fetch) (decode) (execute) (writeback)))
+ ; `state' is a list of variables for recording model state
+ (state
+ ; State items
+ ; These are all masks with each bit representing one register.
+ (prev-fp-load DI) ; Previous use of FR register was floating point load
+ (prev-fr-p4 DI) ; Previous use of FR register was media unit 4
+ (prev-fr-p6 DI) ; Previous use of FR register was media unit 6
+ (prev-acc-p2 DI) ; Previous use of ACC register was media unit 2
+ (prev-acc-p4 DI) ; Previous use of ACC register was media unit 4
+ (cur-fp-load DI) ; Current use of FR register is floating point load
+ (cur-fr-p4 DI) ; Current use of FR register is media unit 4
+ (cur-fr-p6 DI) ; Current use of FR register is media unit 6
+ (cur-acc-p2 DI) ; Current use of ACC register is media unit 2
+ (cur-acc-p4 DI) ; Current use of ACC register is media unit 4
+ )
+ (unit u-exec "Execution Unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Basic integer insn unit
+ (unit u-integer "Integer Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Integer multiplication unit
+ (unit u-imul "Integer Multiplication Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRdoublek INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Integer division unit
+ (unit u-idiv "Integer Division Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Branch unit
+ (unit u-branch "Branch Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)
+ (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs
+ ((pc)) ; outputs
+ () ; profile action (default)
+ )
+ ; Trap unit
+ (unit u-trap "Trap Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)
+ (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Condition code check unit
+ (unit u-check "Check Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ICCi_3 INT -1) (FCCi_3 INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; GR set half unit
+ (unit u-set-hilo "GR Set Half" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ ((GRkhi INT -1) (GRklo INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR load unit -- TODO doesn't handle quad
+ (unit u-gr-load "GR Load Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (GRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR store unit -- TODO doesn't handle quad
+ (unit u-gr-store "GR Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; FR load unit -- TODO doesn't handle quad
+ (unit u-fr-load "FR Load Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((FRintk INT -1) (FRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; FR store unit -- TODO doesn't handle quad
+ (unit u-fr-store "FR Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Swap unit
+ (unit u-swap "Swap Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; FR Move to GR unit
+ (unit u-fr2gr "FR Move to GR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintk INT -1)) ; inputs
+ ((GRj INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; SPR Move to GR unit
+ (unit u-spr2gr "SPR Move to GR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((spr INT -1)) ; inputs
+ ((GRj INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR Move to FR unit
+ (unit u-gr2fr "GR Move to FR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR Move to SPR unit
+ (unit u-gr2spr "GR Move to SPR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRj INT -1)) ; inputs
+ ((spr INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M1 -- see table 14-8 in the fr450 LSI
+ (unit u-media-1 "Media-1 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-1-quad "Media-1-quad unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-hilo "Media-hilo unit -- a variation of the Media-1 unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ ((FRkhi INT -1) (FRklo INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M2 -- see table 14-8 in the fr450 LSI
+ (unit u-media-2 "Media-2 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-quad "Media-2-quad unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-acc "Media-2-acc unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-acc-dual "Media-2-acc-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-add-sub "Media-2-add-sub unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-add-sub-dual "Media-2-add-sub-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M3 -- see table 14-8 in the fr450 LSI
+ (unit u-media-3 "Media-3 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-3-dual "Media-3-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-3-quad "Media-3-quad unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M4 -- see table 14-8 in the fr450 LSI
+ (unit u-media-4 "Media-4 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-4-accg "Media-4-accg unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACCGi INT -1) (FRinti INT -1)) ; inputs
+ ((ACCGk INT -1) (FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-4-acc-dual "Media-4-acc-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-4-mclracca "Media-4 unit for MCLRACC with #A=1" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M6 -- see table 14-8 in the fr450 LSI
+ (unit u-media-6 "Media-6 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M7 -- see table 14-8 in the fr450 LSI
+ (unit u-media-7 "Media-1 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FCCk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual Expand unit
+ (unit u-media-dual-expand "Media Dual Expand unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual half to byte unit
+ (unit u-media-dual-htob "Media Half to byte" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Barrier unit
+ (unit u-barrier "Barrier unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Memory Barrier unit
+ (unit u-membar "Memory Barrier unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache invalidate unit
+ (unit u-ici "Insn cache invalidate unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache invalidate unit
+ (unit u-dci "Data cache invalidate unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache flush unit
+ (unit u-dcf "Data cache flush unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache preload unit
+ (unit u-icpl "Insn cache preload unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache preload unit
+ (unit u-dcpl "Data cache preload unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache unlock unit
+ (unit u-icul "Insn cache unlock unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache unlock unit
+ (unit u-dcul "Data cache unlock unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+)
+\f