CoreABC HB
CoreABC HB
Handbook
CoreABC v3.8
Microsemi makes no warranty, representation, or guarantee regarding the information contained herein or the suitability of
its products and services for any particular purpose, nor does Microsemi assume any liability whatsoever arising out of the
application or use of any product or circuit. The products sold hereunder and any other products sold by Microsemi have
been subject to limited testing and should not be used in conjunction with mission-critical equipment or applications. Any
performance specifications are believed to be reliable but are not verified, and Buyer must conduct and complete all
performance and other testing of the products, alone and together with, or installed in, any end-products. Buyer shall not
Microsemi Headquarters
rely on any data and performance specifications or parameters provided by Microsemi. It is the Buyer’s responsibility to
One Enterprise, Aliso Viejo, independently determine suitability of any products and to test and verify the same. The information provided by Microsemi
CA 92656 USA hereunder is provided “as is, where is” and with all faults, and the entire risk associated with such information is entirely
Within the USA: +1 (800) 713-4113 with the Buyer. Microsemi does not grant, explicitly or implicitly, to any party any patent rights, licenses, or any other IP
Outside the USA: +1 (949) 380-6100 rights, whether with regard to such information itself or anything described by such information. Information provided in this
Sales: +1 (949) 380-6136 document is proprietary to Microsemi, and Microsemi reserves the right to make any changes to the information in this
Fax: +1 (949) 215-4996 document or to any products and services at any time without notice.
Email: [email protected]
www.microsemi.com
About Microsemi
©2020 Microsemi, a wholly owned Microsemi, a wholly owned subsidiary of Microchip Technology Inc. (Nasdaq: MCHP), offers a comprehensive portfolio of
subsidiary of Microchip Technology Inc. All semiconductor and system solutions for aerospace & defense, communications, data center and industrial markets.
rights reserved. Microsemi and the Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs and
Microsemi logo are registered trademarks of ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world's
Microsemi Corporation. All other trademarks standard for time; voice processing devices; RF solutions; discrete components; enterprise storage and communication
and service marks are the property of their solutions, security technologies and scalable anti-tamper products; Ethernet solutions; Power-over-Ethernet ICs and
midspans; as well as custom design capabilities and services. Learn more at www.microsemi.com.
respective owners.
1 Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Revision 12.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Revision 11.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Revision 10.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Revision 9.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.5 Revision 8.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.6 Revision 7.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.7 Revision 6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.8 Revision 5.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.9 Revision 4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.10 Revision 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.11 Revision 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.12 Revision 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1 CoreABC Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Supported Device Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Core Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Supported Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5 Supported Tool Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.6 Utilization and Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1 Overview of Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 EN_DATAM Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4 Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6 CoreABC Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.1 ACM Lookup Table for Use with CoreAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.3 Interrupt Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
8 CoreABC Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.1 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2 CoreABC Instruction Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2.1 Hard Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.2.2 Soft Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.2.3 NVM Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
9 Tool Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.1 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.1.1 Obfuscated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.1.2 RTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.2 SmartDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.3 Simulation Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.4 Synthesis in Libero IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.5 Place-and-Route in Libero IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.6 Design Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.6.1 Timing Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
10 Testbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.1 Unit Testbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.2 System Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.3 Simulation Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
1 Revision History
The revision history describes the changes that were implemented in the document. The changes are
listed by revision, starting with the most current publication.
2 Introduction
CoreAI
ParallelI/O Out
CoreABC CorePWM
APB Bus
ParallelI/O In
CoreUART
Data Frequency
Family Width Config. Comb. Seq. RAM Total Device Utilization MHz*
Fusion ProASIC®3/E 8 Small 179 46 0 225 AFS600 A3P600 AGL600 1.6% 92
IGLOO™/e
ProASICPLUS 8 Small 195 51 0 246 APA450 2.0% 81
Axcelerator® RTAX-S 8 Small 96 45 0 141 AX250 RTAX250 3.3% 123
Fusion ProASIC3/E 16 Small 238 59 0 297 AFS600 A3P600 AGL600 2.1% 79
IGLOO/e
ProASICPLUS 16 Small 269 63 0 332 APA450 2.7% 79
Axcelerator RTAX-S 16 Small 127 57 0 184 AX250 RTAX250 4.4% 98
Fusion ProASIC3/E 32 Small 319 74 0 393 AFS600 A3P600 AGL600 2.8% 58
IGLOO/e
ProASICPLUS 32 Small 381 84 0 465 APA450 3.9% 60
Axcelerator RTAX-S 32 Small 192 78 0 270 AX250 RTAX250 6.4% 97
PolarFire 8 Small 61 40 0 101 MPF300TS 0.03% 200
PolarFire 16 Small 83 48 0 131 MPF300TS 0.05% 200
PolarFire 32 Small 120 65 0 185 MPF300TS 0.06% 200
RTG4 8 Small 71 38 0 101 RT4G150 0.08% 100
RTG4 16 Small 93 46 0 139 RT4G150 0.09% 100
RTG4 32 Small 130 63 0 193 RT4G150 0.13% 100
IGLOO2 /SmartFusion2 8 Small 61 40 0 101 M2S150TS 0.07% 150
IGLOO2/ SmartFusion2 16 Small 83 48 0 131 M2S150TS 0.09% 150
IGLOO2/ SmartFusion2 32 Small 120 65 0 185 M2S150TS 0.12% 150
Fusion ProASIC3/E 8 Medium 363 76 1 439 AFS600 A3P600 AGL600 3.2% 55
IGLOO/e
ProASICPLUS 8 Medium 439 88 1 527 APA450 4.3% 41
Axcelerator RTAX-S 8 Medium 229 76 1 305 AX250 RTAX250 7.2% 86
Fusion ProASIC3/E 16 Medium 558 88 1 646 AFS600 A3P600 AGL600 4.7% 41
IGLOO/e
ProASICPLUS 16 Medium 630 95 2 725 APA450 5.9% 32
Axcelerator RTAX-S 16 Medium 307 92 1 399 AX250 RTAX250 9.4% 73
Fusion ProASIC3/E 32 Medium 896 104 2 1,000 AFS600 A3P600 AGL600 7.2% 37
IGLOO/e
ProASICPLUS 32 Medium 947 112 4 1,059 APA450 8.6% 28
Axcelerator RTAX-S 32 Medium 442 108 2 550 AX250 RTAX250 13.0% 64
PolarFire 8 Medium 578 148 2 726 MPF300TS 0.24% 130
Family Data Config. Comb. Seq. RAM Total Device Utilization Frequency
Width MHz*
Fusion ProASIC3/E 8 Small 126 27 3 153 AFS600 A3P600 1.1% 68
IGLOO/e AGL600
Note: *The frequency given in the table does not apply to the IGLOO devices. IGLOO family devices will run
significantly slower than the speed listed in the table.
3 Functional Description
CoreABC internal architecture is shown in Figure 2, page 9. The core consists of six main blocks:
• Instruction block
• Sequencer
• ALU and Flags
• Storage
• Analog configuration MUX (ACM)
• APB controller
Figure 2 • CoreABC Block Diagram
APB Slave Interface(NVM mode only)
Address
Data
Address RAM
APBAccess Register
Bank and
Operation Stack
+1 Storage
Next Instruction
Instruction Instruction
Address Address ALU
Table Register
Address Register
MULT ACM
Instruction Block Lookup
Table
AND
ACM
Data OR
Accumulator Register
Data
XOR
Z Register Command
ADD
SHL
Control State Machine
SHR
Sequencer
LOAD APB Data out
Data
Interrupt
Parallel I/0 In Data in
Parallel I/0 Out ALU and Flags
Data
Address
Address
APB Interface
State Machine
APB Controller
APB MasterInterface
The Instruction block contains the instruction counter and the instruction table that contains the
instructions to be executed. In soft mode, these instructions are fetched from RAM internal to CoreABC.
The ALU and Flags block implements the main ALU block. Each of the supported operations can be
disabled to obtain a minimal-gate-count solution. The Storage block provides local storage for data
values and implements the stack required by the call instruction.
The ACM block implements a small lookup table that can be initialized with the configuration data
required by CoreAI. This allows the analog functions within a Fusion AFS FPGA to be easily configured.
4 Interface
4.2 Parameters
The parameters described are those directly in the RTL. When working with CoreABC in the
SmartDesign tool, a configuration GUI is available for setting these parameters. The recommended
configuration flow is to use the configuration GUI in SmartDesign, which will then set these parameters
correctly. Importantly, when using the configuration GUI, the parameter settings will be cross checked
with the CoreABC program (which is entered in another tab of the configuration GUI). The configuration
GUI will indicate any inconsistencies between the program and the parameter settings. For more
information about configuring GUI, refer section “CoreABC Configuration, page 25".
Value
Parameter Values Description Small Medium Large
APB_AWIDTH 8 to 16 Sets the width of the APB address bus. 8 8 8
APB_DWIDTH 8, 16, or 32 Sets the width of the APB data bus. 8, 16, 32 8, 16, 32 8, 16, 32
APB_SDEPTH 1 to 16 Sets the number of supported APB devices. 1 4 16
ICWIDTH 1 to 16 Sets the maximum number of supported instructions. 5 8 8
Number of allowed instructions is 2ICWIDTH.
ICWIDTH must be APB_AWIDTH.
ZRWIDTH 0 to 16 Sets the width of the Z register. A setting of 8 would 0 8 8
allow for a maximum value of 28 (i.e., 256). Zero will
disable and remove the Z register.
IIWIDTH 1 to 32 Sets the width of the IO_IN input. IIWIDTH must be 1 4 4
APB_DWIDTH.
IFWIDTH 1 to 28 Sets how many of the IO_IN bits can be used with
the conditional instructions. IFWIDTH must be
APB_DWIDTH – 4.
Value
Parameter Values Description Small Medium Large
IOWIDTH 1 to 32 Sets the width of the IO_OUT output. IOWIDTH must be APB_DWIDTH. 1 8 8
STWIDTH 1 to 8 Sets the size of the internal stack counter used to support the call instruction and 1 4 4
interrupt function. The depth of the stack is 2STWIDTH.
EN_RAM 0 or 1 When 1, a RAM block is used in the core to provide 256 storage locations. This 0 1 1
RAM is also used to store return addresses for the call and interrupt functions.
EN_RAM_ECC 0 or 1 When 1, enables ECC support for the RAM blocks. When 0, disables ECC
support for the RAM blocks. EN_RAM_ECC parameter is valid only when
parameter EN_RAM is set to 1. EN_RAM_ECC parameter is valid only for
RTG4, PolarFire, and PolarFire SoC device families.
EN_AND 0 or 1 When 1, the ALU supports the AND function. 1 1 1
EN_XOR 0 or 1 When 1, the ALU supports the XOR function. 1 1 1
EN_OR 0 or 1 When 1, the ALU supports the OR function. 0 1 1
EN_ADD 0 or 1 When 1, the ALU supports the ADD function. 0 1 1
EN_INC 0 or 1 When 1, the ALU supports the INC function. 0 1 1
EN_SHL 0 or 1 When 1, the ALU supports the SHL/ROL function. 0 1 1
EN_SHR 0 or 1 When 1, the ALU supports the SHR/ROR function. 0 1 1
EN_CALL 0 or 1 When 1, the core supports the call and return operations. 0 1 1
EN_PUSH 0 or 1 When 1, the core supports the push and pop operations. 0 1 1
EN_ACM 0 or 1 When 1, enables the ACM initialization table. 0 1 1
EN_DATAM 0 to 3 Controls internal multiplexing; see EN_DATAM Parameter, page 13 1 1 1
EN_INT 0 to 2 Enables the external interrupt function. When 0, interrupts are disabled. When 0 1 1
1, INTREQ is active high. When 2, INTREQ is active low.
EN_MULT 0 to 3 Enables the hardware multiplier; four options exist (example for 16-bit core): 0 0 0
0: No hardware multiplier
1: Half multiplier, P(15:0) <= A(7:0) * B(7:0)
2: Full multiplier returning lower half, P(15:0) <= A(15:0) * B(15:0)
3: Full multiplier returning upper half, P(31:16) <= A(15:0) * B(15:0)
EN_IOREAD 0 or 1 When 1, the IOREAD instruction is enabled. 0 1 1
EN_IOWRT 0 or 1 When 1, the IOWRT instruction is enabled. 1 1 1
EN_ALURAM 0 or 1 When 1, the Boolean and Arithmetic instructions can operate on memory 0 1 1
contents.
EN_INDIRECT 0 or 1 When 1, the Z register can be used to generate the APB address, and the 0 0 1
APBWRTZ and APBREADZ instructions are enabled.
ISRADDR 0 to The address CoreABC should jump to when responding to an interrupt request. 0 220 220
65,535
Value
Parameter Values Description Small Medium Large
INSMODE 0 to 2 When 0, the instructions are contained in internal logic 0 0 1
gates, implementing a ROM function. When 1, internal
RAM blocks are used to hold the instruction
sequence. When 2, internal NVM is used to hold the
instruction sequence. INSMODE = 2 is supported only
on Fusion AFS devices.
ACT_CALIBRATIONDATA 0 or 1 When 1, the NVM block containing the calibration data N/A N/A N/A
for the device is selected if INSMODE = 2. When 0,
any available NVM block may be used. This option is
only applicable when
INSMODE = 2, which implies that a Fusion AFS
device is being used.
IMEM_APB_ACCESS 0 to 2 When 0, APB access to instruction memory is not N/A N/A N/A
supported. When 1, read only APB access to
instruction memory is possible. When 2, read and
write APB access to instruction memory is supported.
INITWIDTH 1 to 16 Specifies the width of the INITADDR input used to 0 0 16
initialize the instruction RAM blocks when INSMODE
= 1. The actual width depends on several generic
values. Utilities used to support soft operation
calculate this value.
DEBUG 0 or 1 When 1 during simulation, a detailed log will be N/A N/A N/A
generated of the internal operation.
TESTMODE 0 to 16 Selects a predefined set of instructions used for core N/A N/A N/A
verification. This should be set to 0 unless the
verification test sequences are being used.
UNIQ_STRING_LENGTH 0 to 256 This parameter gives the length (number of N/A N/A N/A
characters) of the unique string which is derived from
the instance name of a particular CoreABC instance.
This parameter forms part of the mechanism which
allows multiple instances of CoreABC to be easily
used in a single design.
MAX_NVMDWIDTH 16 or 32 Indicates the maximum bit width supported on N/A N/A N/A
the data buses connecting to any NVM macro within
CoreABC. This parameter is only applicable when
CoreABC is configured to operate in NVM mode which
is only possible for a Fusion AFS device. This
parameter is not directly controllable from the
configuration GUI but is instead automatically set to
match the target device. A setting of 16 is applied
when an AFS090 device is targeted. For all other
devices the parameter is set to 32.
4.4 Ports
All CoreABC inputs are sampled, and outputs clocked, on the rising edge of PCLK.
CoreABC is an accumulator based load/store architecture with multiple independent memory spaces. It
is effectively a Harvard architecture (independent instruction and data address spaces). Most instructions
act only on the accumulator, but there are specific instructions to access the memory spaces described
below.
0xFF I/O – IN
Slot n
I/O – OUT
Slot 0
0x00
5.2 Registers
5.2.1 Accumulator
The accumulator (ACC) holds the result of data operations and is APB_DWIDTH (8, 16, or 32) bits wide.
Flags
Instruction1, 2 Description Acc. Zero Acc. Neg. Cycles
LOAD DAT Data Load accumulator with value. Yes Yes 3
LOAD RAM Address Load accumulator with value. Yes Yes 3
AND DAT Data Bitwise AND accumulator with immediate data. Yes Yes 3
AND RAM Address Bitwise AND accumulator with RAM location. Yes Yes 3
OR DAT Data Bitwise OR accumulator with immediate data. Yes Yes 3
OR RAM Address Bitwise OR accumulator with RAM location. Yes Yes 3
XOR DAT Data Bitwise XOR accumulator with immediate data. Yes Yes 3
XOR RAM Address Bitwise XOR accumulator with RAM location. Yes Yes 3
INC Increment accumulator. Yes Yes 3
DEC Decrement accumulator. Yes Yes 3
ADD DAT Data Add immediate data to accumulator. Yes Yes 3
ADD RAM Address Add RAM location to accumulator. Yes Yes 3
SUB DAT Data Subtract immediate data from accumulator. SUB RAM Yes Yes 3
is not supported.
MULT DAT Data Multiply accumulator by immediate data. Yes Yes 3
Core parameters determine multiplier return value.
MULT RAM Address Multiply accumulator by RAM location. Yes Yes 3
Core parameters determine multiplier return value.
CMP DAT Data Compare accumulator to immediate data. Yes Yes 3
ZERO set if equal; NEGATIVE set if MSBs differ.
CMP RAM Address Compare accumulator to RAM location. Yes Yes 3
ZERO set if equal; NEGATIVE set if MSBs differ.
CMPLEQ DAT Data Compare accumulator to immediate data. Yes Yes 3
ZERO set if equal; NEGATIVE set if ACC < Data.
CMPLEQ RAM is not supported.
SHL0 Shift accumulator left and infill with 0. Yes Yes 3
Note:
1. For most instructions, when using the configuration GUI, the DAT keyword can be omitted.
2. DAT may be replaced with DAT8 or DAT16 when only lower 8 or 16 data bits contain valid data. Using
DAT8/DAT16 will reduce tile counts when instructions are held in logic tiles (that is, when the core is
configured to operate in hard mode).
Flags
Instruction1, 2 Description Acc. Zero Acc. Neg. Cycles
SHR0 Shift accumulator right and infill with 0. Yes Yes 3
SHL1 Shift accumulator left and infill with 1. Yes Yes 3
SHR1 Shift accumulator right and infill with 1. Yes Yes 3
SHLE Shift accumulator left and infill with LSB. Yes Yes 3
SHRE Shift accumulator right and infill with MSB. Yes Yes 3
ROL Rotate accumulator left. Yes Yes 3
ROR Rotate accumulator right. Yes Yes 3
BITCLR Data Clear one bit in accumulator specified by argument Yes Yes 3
(AND). In this case, the data value specifies the bit
BITSET Data Set one bit in accumulator specified by argument (OR). Yes Yes 3
In this case, the data value specifies the bit position.
BITTST Data Test one bit in accumulator. ZERO set if all requested Yes Yes 3
bits are clear. In this case, the data value specifies the
bit position.
Note:
1. For most instructions, when using the configuration GUI, the DAT keyword can be omitted.
2. DAT may be replaced with DAT8 or DAT16 when only lower 8 or 16 data bits contain valid data. Using
DAT8/DAT16 will reduce tile counts when instructions are held in logic tiles (that is, when the core is
configured to operate in hard mode).
Flags
Instruction Description Acc. Zero Acc. Neg. Cycles
PUSH Push the accumulator onto the stack. No No 3
PUSH ACC Push the accumulator onto the stack. No No 3
PUSH DAT Data Push immediate data onto stack. No No 3
POP Pop data from the stack to the accumulator Yes Yes 3
and update the flags.
RAMWRT Address ACC Write accumulator to RAM address. No No 3
RAMWRT Address DAT Data Write immediate data to RAM address. No No 3
RAMREAD Address Read data from RAM address to the Yes Yes 3
accumulator and update the flags.
Flags
Instruction Description Acc. Zero Acc. Neg. Cycles
LOADZ ACC Load Z with accumulator. No No 3
LOADZ DAT Data Load Z with immediate value. No No 3
Note: *The Z register is intended to be used as loop counter or APB address register.
Flags
Instruction Description Acc. Zero Acc. Neg. Cycles
ADDZ ACC Add accumulator to Z and store in Z. Only ZZERO flag No No 3
is affected.
ADDZ DAT Data Add immediate data to Z and store in Z. Only ZZERO No No 3
flag is affected.
SUBZ DAT Data Subtract immediate data from Z and store in Z. Only No No 3
ZZERO flag is affected
SUBZ ACC is not supported.
Note: *The Z register is intended to be used as loop counter or APB address register.
Flags
Instruction Description Acc. Zero Acc. Neg. Cycles
APBREAD Slot Address Read from APB. No No 5
APBWRT ACC Slot Address Write accumulator to APB at chosen No No 5
APBWRT ACM Slot Address Write value of ACM table, at location given No No 5
by accumulator, to APB at chosen address.
APBWRT DAT Slot Address Data Write data to chosen address. No No 5
APBREADZ Slot Read from APB. The Z register specifies the No No 5
APB address.
APBWRTZ ACC Slot Write accumulator to APB. The Z register No No 5
specifies the APB address.
APBWRTZ ACM Slot Write value of ACM table, at location given No No 5
by accumulator. The Z register specifies the
APB address.
APBWRTZ DAT Slot Data Write data; the Z register specifies the APB No No 5
address.
Flags
Instruction Description Acc. Zero Acc. Neg. Cycles
IOWRT ACC Write accumulator to I/O register. No No 3
IOWRT DAT Data Write data value to I/O register. No No 3
IOREAD Load the accumulator with the I/O input value. No No 3
Flags
Instruction Description Acc. Zero Acc. Neg. Cycles
JUMP Condition $Label Jump to label. No No 3
JUMP IF/IFNOT Condition $Label Jump on condition to label. No No 3
WAIT UNTIL/WHILE Condition Stop at this instruction until condition is No No 3
TRUE.
CALL $Label As JUMP, but puts return address on No No 3
CALL IF/IFNOT Condition $Label As JUMP, but puts return address on No No 3
RETURN Return from a CALL. No No 3
RETURN IF/IFNOT Condition Return from a CALL on condition. No No 3
RETISR Condition Return from an interrupt. No No 3
RETISR IF/IFNOT Condition Return from an interrupt on condition. No No 3
HALT Stop at this instruction. Interrupts will still No No Indefinite
be processed. HALT is a synonym for
WAIT, and generally used without a
Condition Description
ALWAYS Always. You can get the same effect as this by not specifying any condition.
ZERO Accumulator zero
NEGATIVE Accumulator negative
ZZERO Z register zero
INPUT0 Input0 set
INPUT1 Input1 set and similarly for higher Inputs, if available.
POSITIVE Equivalent to NOT NEGATIVE
LTE_ZERO Less than or equal to zero; the combination NEGATIVE OR ZERO
GT_ZERO Greater than zero; the combination NOT (NEGATIVE OR ZERO)
Flags
Instruction Description Acc. Zero Acc. Neg. Cycles
NOP No operation No No 3
6 CoreABC Operation
6.2 Stack
The upper 2STWIDTH memory locations in the 256-location internal storage are used for storing the stack
contents. If STWIDTH = 4 (stack is 16 locations deep), the stack will occupy locations 0xF0 to 0xFF.
There is no underflow or overflow detection on the stack pointer, so it will simply wrap around from 0xF0
to 0xFF on push operations and 0xFF to 0xF0 on pop operations (assuming STWIDTH = 4).
The RAMREAD and RAMWRT instructions can be used to read and modify the values pushed onto the
stack. An indirect jump instruction can be implemented by pushing the required jump address on the
stack and executing a return instruction.
the WAIT or modifies the stack contents; for example, it could POP the return address, modify it, and
PUSH it back on the stack.
When the interrupt functionality is being used, CoreABC's program will often be structured such that the
first instruction (at instruction address 0) is a JUMP to the main loop of the program and the ISR will be
located immediately after this, at instruction address 1. The instructions of the main loop will be located
just after the ISR in the program memory.
7 CoreABC Configuration
The CoreABC configuration GUI is launched when instantiating the core in a SmartDesign design. After
instantiation, the configuration GUI can be opened by double-clicking on the CoreABC instance or by
right-clicking and selecting Configure Component.
The configuration GUI has three tabs: Parameters, Program, and Analysis.
Select the Parameters tab on the CoreABC configuration GUI to begin configuring the core. When you do
this, you will see the screen shown in Figure 6.
Figure 6 • Configuration Parameters
7.1.21 License
This option is used to generate either obfuscated or plain text RTL code for the core, depending on the
type of license you have. An obfuscated license enables you to generate obfuscated RTL code. An RTL
license permits generation of either obfuscated or plain text RTL code.
7.1.22 Testbench
Set this to User if you want a user testbench generated with your core.
In the example shown in Figure 8, the Maximum Z Register has been set to Disabled, but there is an
instruction in the program (LOADZ) which requires that the Z register features are available.
Figure 8 • CoreABC Configuration Validation
In general, the validation is more extensive on the Parameters tab than on the Program tab, so it is a
good idea to take a look at the Parameters tab when you have completed writing your program.
Some cross-validation actually grays out fields that are inappropriate when other settings have not been
made.
As the message indicates, APB accesses to the NVM instruction store will be limited to 16 bits in this
case, even though a data width of 32 has been selected. 32-bit access is supported to any other slaves
which may be connected to the APB bus. Click the OK button on this message to dismiss the message
(and the CoreABC configuration window).
8 CoreABC Programming
CoreABC programs are written and assembled under the Program tab of the CoreABC Configuration GUI,
as shown in Figure 10. You can view an analysis of your code under the Analysis tab.
Figure 10 • CoreABC Programming Screen
8.1 Analysis
If the Analyze program as I type check box is selected (under the Program tab), your program is
continuously analyzed as you write it, to detect any syntax or other errors. These errors are immediately
flagged, and information about them is provided. Color coding of the program is used, with comments
appearing in green, valid instructions in blue, and errors in red. As the program becomes larger, analysis
takes longer with each character typed and this eventually impacts usability. If this is an issue, you can
turn off analysis (by clearing the check box) when you enter the program. You can then turn on the
analysis again when the program is complete or almost complete.
Under the Analysis tab, you will find useful information and statistics on your program, most of which is
self-explanatory. For example, the instructions used in the program are listed and this information may be
useful for optimizing your CoreABC instance by omitting support for any unused instructions (under the
Optional Instructions section of the Parameters tab). In soft or NVM mode, the Analysis tab will also
contain information of use when creating a Flash Memory System Builder Data Storage or Initialization
Client.
2. In the CoreABC configurator Analysis view, as shown in Figure 12, note the configuration details
which will be needed when configuring a Fusion AFS Flash Memory System Builder [RAM]
Initialization Client.
3. These FMSB Initialization Client configuration details are also written to the CoreABC.log file, which
appears in the Design Explorer > Files view under Components > [SmartDesign-name]> Report
Files.
4. Save the CoreABC configuration. Note in SmartDesign that the InitCfg bus interface now appears on
the CoreABC instance Figure 13.
Figure 13 • CoreABC Instance
5. The next task is to instantiate, configure, stitch, and generate a Fusion AFS Flash Memory System
Builder initialization client into the design to store the soft mode program image in an NVM block and
to initialize the CoreABC soft mode program storage RAM blocks at startup time. However, we do
not yet have the required soft mode program image so cannot do this yet. For this reason we must
generate the currently incomplete design first.
8. Click OK and then Generate. Name the instance and click OK again. Back in SmartDesign, the Flash
Memory System Builder initialization client instance should now appear as shown in Figure 15.
9. Select the Initialization client instance and choose SmartDesign > Auto Connect Selected
Instance(s) and SmartDesign will connect the CoreABC’s slave InitCfg slave interface to the
initialization client’s master interface. Manually connect the remaining initialization client’s signals,
as shown in Figure 16.
Figure 16 • Connect Initialization Client’s Signal
10. The design is now complete and can be generated using SmartDesign > Generate Design.
11. Go to the Libero IDE Project Flow view and click on Synplify® to run synthesis.
12. When synthesis has completed, exit Synplify and then click on Place & Route to run Compile,
Layout, and Programming File generation.
13. When you click on Programming File in Designer to run FlashPoint, to generate the programming
file (a PDB file, for example), you will get the warning shown in Figure 17 if the SmartDesign design
was recently regenerated. This is because the FMSB initialization client’s input binary soft mode
program image file is more recent than the generated EFC file, so you need to reimport the updated
input file.
14. Click on Modify > Import Content and reimport the soft mode binary memory image file. The Import
dialog should open on the correct folder containing the file (that is, <Libero-project-
root>\component\work\<SmartDesign-name>\<CoreABC-instance-name>). Click OK and then
Finish to generate the programming file (PDB file). Click Generate and, if warned about overwriting
a previously generated programming file, accept/confirm this. Once the Programming File button in
Designer turns green, exit Designer and return to the Libero IDE Program Flow view.
15. You can now program the device. The program image will be programmed into an NVM block and,
at startup time, this image will be used to initialize the soft mode CoreABC instruction RAM blocks.
Note:If you change your CoreABC configuration or program, you must ensure that the Initialization
client configuration matches the details presented in the CoreABC configurator’s Analysis view. If
you forget to do this, it could result in an incorrectly formatted or incomplete program image being
stored or initialized to CoreABC RAM blocks.
2. The CoreABC configurator Analysis view note (Figure 19) shows the configuration details which will
be needed when configuring a Fusion AFS Flash Memory System Builder Data Storage Client.
The CoreABC generator also emits a text version of the Analysis view content into a log file (<Libero-
project-root>\component\work\<SmartDesign-name>\<CoreABC-instance- name>\CoreABC.log). It will
appear in the Design Explorer > Files view under Components > [SmartDesign-name] > Report Files >
CoreABC.log. This will be used in the following steps when configuring the FMSB Data Storage Client.
3. Choose SmartDesign > Generate Design.
4. Go to Design Explorer > Files > Components > [SmartDesign-name] > Report Files and open
CoreABC.log, which contains the same details as the CoreABC configurator Analysis view. In
particular it includes the details required for configuration of the Fusion AFS Flash Memory System
Builder Data Storage Client required for the NVM mode CoreABC instance. Scroll down to the Fusion
AFS Flash Memory System Builder Data Storage Client configuration section. Select and copy the
name of the NVM mode Intel-Hex memory image file. You will paste this into the FMSB Data Storage
Client configuration in a subsequent step. Keep the CoreABC.log file open so that it is visible and you
can see the other FMSB Data Storage Client configuration details during the next steps.
5. In the Libero IDE Catalog, right-click the Fusion AFS Peripherals > Flash System Memory Builder
core and choose Configure core (Figure 20). It is not necessary to create an FMSB instance (by
double-clicking or choosing Instantiate in <SmartDesign-name>), although creating one will not
cause a problem.
6. Select Data Storage client type and click Add to System, as shown in Figure 21.
Figure 21 • Add Data Storage
7. Configure the Data Storage Client according to the details displayed in the CoreABC.log file. In
particular, paste the NVM memory image file name copied earlier into the Memory content file field
and enter a Client name. Configure the Start address, Size of word, and Number of words options
(Figure 22).
8. Click OK and then Generate. Name the core when prompted. The configured Fusion AFS Flash
Memory System Builder Data Storage Client component should now appear under the Hierarchy tab
in your Design Explorer, as shown in Figure 23.
Figure 23 • Hierarchy Tab in Design Explorer
9. Go to the Libero IDE Project Flow view and click Synplify to run synthesis.
10. When synthesis has completed, exit Synplify and then click Place & Route to run Compile, Layout,
and Programming File generation. When you click Programming File in Designer to run FlashPoint
to generate the programming file (PDB file), you will receive the warning shown in Figure 24.
11. In this case it is necessary to update the configuration. Click Modify to get the dialog shown in
Figure 25.
Figure 25 • Modify Block Dialog
12. Click Import Configuration File. Browse to and select the relevant EFC file for the CoreABC NVM
mode program image. The EFC file should be in a subfolder of the <Libero-project- root>\smartgen
folder.
In this example, the file has the following location:
<Libero-project-root-folder>\smartgen\abc_program_in_nvm\abc_program_in_nvm.efc.
If the SmartDesign design was regenerated more recently than the FSMB Data Storage Client (which
is quite likely), you will receive the warning shown in Figure 26 because the input Intel Hex file is
more recent than the generated EFC file.
13. Click Import Content to import the NVM mode program image Intel Hex file (the Import dialog
should open on the correct folder containing this file).
Once you have done this, the configuration should be up to date, as shown in Figure 27.
Figure 27 • Configuration Up to Date
Click OK, Finish, and then Generate. You may be asked to confirm the overwriting of
a previously generated programming (PDB) file, in which case confirm/accept this.
14. Once the programming file has been generated, exit Designer and return to the Libero IDE Program
Flow view. You can now program the board with your CoreABC NVM mode design.
15. IMPORTANT: Bear in mind that if you change the CoreABC program such that it becomes longer than
the size (number of words) previously configured in the Fusion AFS Flash Memory System Builder
Data Storage Client component (see step 7), you will need to reconfigure and regenerate the file. For
this reason you should always double check the CoreABC Analysis view NVM program details
against the currently configured FMSB Data Storage Client configuration to ensure consistency.
It is possible for a CoreABC program to overwrite or corrupt itself when APB read/write access to the
instruction memory is enabled in NVM mode. You must take care to avoid this. In practice this usually just
means setting the SECTOR, PAGE, and SPARE_PAGE registers in the APB interface to NVM instruction
memory to sufficiently high values. That is, read and write data type accesses to the NVM instruction
memory should normally be to a region of the NVM above the program which is located from address
0x0000 onwards. Table 19 describes the register interface used to access the internal NVM block using
the APB slave interface.
Reset
Offset Register Name R/W Width Value Description
0x00 (This is a range of offsets; R/W APB_DWIDTH – Any access within this range of offsets
to 0x7F see description column for (8, 16, or 32) accesses offset[6:0] in the page held in the
more information.) NVM page buffer addressed by
{SPARE_PAGE_REG + SECTOR_REG +
PAGE_REG}.
If APB_DWIDTH = 8, consecutive bytes are at
offsets 0x00, 0x01, 0x02, etc.
If APB_DWIDTH = 16, consecutive halfwords
are at offsets 0x00, 0x02, 0x04, and so on.
If APB_DWIDTH = 32, consecutive words are
at offsets 0x00, 0x04, 0x08, and so on.
The address to the NVM is always a byte
address and the lower one or two bits of the
address are ignored when the data size is 16 or
32 bits. This means that misaligned addresses
are automatically aligned.
On an AFS090 device, the data width is
restricted to 16 bits when accessing NVM.
When APB_DWIDTH is set to 32 in a design
targeted at an AFS090 device, APB accesses
to the NVM instruction memory will be
consistent with the behavior for APB_DWIDTH
= 16. That is, only the lowest bit of the (byte)
address to the NVM is ignored and only the
lower 16 bits of the read and write data buses
carry valid data.
0x80 PAGE_REG W 5 0x0 Page of NVM being accessed during APB
accesses (to an offset in the range 0x00 to
0x7F).
Bits [11:7] of ADDRESS input to NVM block.
0x84 SECTOR_REG W 6 0x0 Sector of NVM being accessed during APB
accesses (to an offset in the range 0x00 to
0x7F).
Bits [17:12] of ADDRESS input to NVM block.
0x88 SPARE_PAGE_REG W 1 0x0 Drives SPAREPAGE input to NVM during APB
accesses (to an offset in the range 0x00 to
0x7F).
0x8C Reserved - - - -
0x90 Reserved -
9 Tool Flows
9.1 Licensing
CoreABC is licensed in two ways: Obfuscated and RTL. Tool flow functionality may be limited, depending
on your license.
9.1.1 Obfuscated
Complete RTL code is provided for the core, enabling the core to be instantiated, configured, and
generated within SmartDesign. Simulation, Synthesis, and Layout can be performed with Libero
Integrated Design Environment (IDE). The RTL code for the core is obfuscated.
9.1.2 RTL
Complete RTL source code is provided for the core.
9.2 SmartDesign
CoreABC is available for download to the SmartDesign IP Catalog via the Libero IDE web repository. For
information on using SmartDesign to instantiate, configure, connect, and generate cores, refer to the
Libero IDE online help.
The APB master interface of CoreABC will typically be connected to the mirrored master interface of
CoreAPB3, with various APB slaves connected to the slave interfaces of CoreAPB3.
The core can be configured using the configuration GUI within SmartDesign. See the CoreABC
Configuration, page 25 for more details on configuring CoreABC.
10 Testbench
APB Bus
The CoreABC unit testbench runs a canned program to exercise the core. APB slave models which
effectively implement some memory are included in the testbench to allow verification of write and read
back operations on the APB interface.
To run the unit testbench, simply set the design root to the CoreABC instance (using right-click, Set As
Root on the instance name in the Hierarchy tab of the Design Explorer) and click on the Simulation
(ModelSim®) button in the Project Flow. The unit testbench should automatically launch and run. A "Tests
Complete ... OKAY" type message will appear in the simulator transcript window if the simulation is
successful.
This section describes the creation of a simple CoreABC based design. The design uses the general
purpose outputs of CoreABC to control eight outputs which may, for example, be used to drive LEDs on a
PCB. A "rotating 1"pattern is produced on the outputs and CoreTimer is used to create a delay between
pattern changes. CoreAPB3 provides the bus fabric that connects the processor and timer peripheral
together. The design is illustrated in Figure 30. In this example, a hard mode CoreABC will be used and
the design will be targeted at a Fusion AFS device. Follow the instructions beginning in the “Create a
New Project, page 50” to create the example design.
Figure 30 • Example CoreABC Design
Outputs Are Looped Back to Inputs
16
IO_IN IO_OUT 16 Outputs
CoreABC
INTREQ
CoreAPB 3
CoreTimer
TIMINT
2. Click Next and on the next screen choose Fusion AFS for the Family and select the AFS600 die and
the 484 FBGA package, as shown in Figure 32.
Figure 32 • Select Family, Die, and Package
4. Click the OK button and the SmartDesign canvas for the abc_system will open.
3. Drag and drop CoreAPB3 onto the SmartDesign canvas. Accept the default configuration by clicking
OK on the CoreAPB3 configuration window. Note that the APB Slot Size settings should always
match for CoreABC and CoreAPB3. This setting has a default value of 256 locations on both cores.
4. Drag and drop CoreTimer onto the SmartDesign canvas. In the CoreTimer configuration window, set
the Width option to 16 bit and leave the Interrupt active level as High and click OK.
5. Choose SmartDesign > Auto Connect (or right-click on a blank area of the canvas and select Auto
Connect). A window entitled Modify Memory Map will appear, which provides the opportunity to move
the timer peripheral to a different slot on the APB3 bus. Accept the default (slot 0) location by clicking
the OK button. Auto connect will connect the clock, reset, and bus connections.
Some manual connections must be made as follows. Click on the TIMINT pin of CoreTimer and,
while holding the CTRL key down on the keyboard, click on the INTREQ pin of CoreABC. Right-
click on either of these highlighted pins and select Connect to connect the two pins together. Right-
click on the IO_OUT[15:0] pin of CoreABC and select Promote to Top Level to connect the outputs
to the top level. Next click again on the IO_OUT[15:0] pin of CoreABC and, while holding down the
CTRL key, also click on the IO_IN[15:0] pin of CoreABC. Then right-click on either of these high-
lighted pins and select Connect to loop the general purpose outputs back to the general purpose
inputs. Finally, right-click on each of the unconnected ports and select Mark Unused (the uncon-
nected ports are INTACT on CoreABC and ports S1 to S15 on CoreAPB3). An X will appear at the end
of the open wire connected to each port marked as unused. The design should resemble the one
shown in Figure 35.
6. Choose SmartDesign > Generate Design (or right-click on a blank area of the canvas and select
Generate Design) to generate the design. If you have omitted marking unconnected ports as
unused, an information window mentioning warnings will pop up. If there are any warnings, choose
SmartDesign > Check Design Rules and review the warnings.
2. In the left pane, click on Waveforms under ModelSim options and in the right pane click the check box
to select Log all signals in the design, as shown in Figure 37.
Logging all signals allows signals to be added to the waveform viewer in the simulator after the simulation
has completed. For a large design and/or a long simulation run time, it is probably better first to run a short
simulation and then add the signals of interest to the waveform viewer. The waveform format would then
be saved to a DO file (typically named wave.do) and, in the Waveforms options window, you would click
the Include DO File option and enter the appropriate filename for the Included DO File value. The Log all
signals in the design option would be deselected.
With the CoreABC instance set as the design root, click the Simulation button. ModelSim will launch and
automatically run the CoreABC unit testbench. A "Tests Complete OKAY" type message will be displayed
in the ModelSim transcript window on successful completion of the testbench, as shown in Figure 40.
11.6 Synthesis
To synthesize the design, first ensure that the design root is set to the top level of the design, which is
abc_system. The design root may have changed if, for example, you ran a CoreABC unit test as
described in the Simulation of CoreABC Only (unit test), page 57. Click the Synthesis button in the
Project Flow window to launch the Synplify synthesis tool. Click Run to run synthesis.
11.7 Place-and-Route
To run place-and-route, click the Place&Route button in the Project Flow window to launch the Designer
tool. Some dialog windows will be displayed as Designer starts. Enter appropriate information in these
windows—normally the default entries can be accepted by clicking the OK button on each window. In
Designer, click the Compile button to run the compile stage. If you intend to implement the design on a
real board, you will need to make some pin assignments to suit the target board. One way of doing this is
to use the I/O Attribute Editor (by clicking on the button of the same name) after compile has completed.
After compiling and making any necessary pin assignments, click the Layout button to run the layout stage.
After layout has completed, a programming file can be created by clicking the Programming File button
and clicking OK to the subsequent windows which pop up after making any necessary edits to the
information presented in these windows.
Migrating an existing design which uses CoreABC v2.3 to one which uses CoreABC v3.0 or later involves
a number of steps. CoreABC v2.3 required the CoreConsole tool to either create a complete CoreABC
based design or to create a CoreABC component (essentially a wrapped CoreABC instance) which
would typically be instantiated in a SmartDesign design. CoreABC v3.0 or later can be instantiated
natively in a SmartDesign design and does not require the CoreConsole tool at all.
A key difference to be aware of between CoreABC v2.3 and CoreABC v3.0 or later is that the CoreABC
v2.3 is designed for use with CoreAPB whereas CoreABC v3.0 or later must be used with CoreAPB3.
Follow these steps to migrate a design using CoreABC v2.3 to one using CoreABC v3.0 or later:
1. Open the original CoreABC v2.3 based design in CoreConsole.
2. Note/record the CoreABC configuration settings and make a copy of the program code.
3. Delete the CoreABC instance from the design.
4. Save and generate the design minus the CoreABC instance. It may be necessary to make some
stitching/connection changes at this point to allow the design to be generated without the CoreABC
instance in place. For example, you may need to tie off some inputs to other cores which were
previously driven by outputs from CoreABC.
5. Import the generated design into Libero IDE / SmartDesign and, when prompted, allow the tool to
convert the design from a CoreConsole design to a SmartDesign design.
6. Open the SmartDesign design.
7. If in the original design CoreABC v2.3 was used to master CoreAPB, replace CoreAPB with
CoreAPB3.
8. Instantiate CoreABC v3.0 or later and apply the original configurations and program code from
Step 2.
9. Connect and generate the design.
The following shows an example instruction sequence that uses CoreABC to control CoreAI, to detect
whether a voltage source is within a range.
// Sample code that reads an analog input and sets an output depending on a
threshold DEF
ACM_SIZE 90
DEF ADC_STAT_HI_ADDR 0x11
DEF ACM_CTRLSTAT 0x0
DEF ACM_DATA_ADDR 0x04
DEF ACM_ADDR_ADDR 0x02
// Set up UART and put out welcome 115200 baud assuming 50 MHz clock
$RESET
APBWRT DAT8 1 8 27
APBWRT DAT8 1 12 1
$WelcomeMessage
WAIT UNTIL INPUT0 APBWRT
DAT8 1 0 'O' WAIT UNTIL
INPUT0 APBWRT DAT8 1 0 'K'
WAIT UNTIL INPUT0 APBWRT
DAT8 1 0 10 WAIT UNTIL INPUT0
APBWRT DAT8 1 0 13
// Set up core AI
// Reset ACM
WAIT WHILE INPUT1
APBWRT DAT8 0
ACM_CTRLSTAT 1 WAIT
WHILE INPUT1
ACM 0 ACM_DATA_ADDR
ADD 1
CMP ACM_SIZE
JUMP IFNOT ZERO $WaitRegProg
SUB 10
JUMP IF NEGATIVE $BCD6
PUSH
RAMREAD 13
INC
RAMWRT 13
POP
JUMP $BCD5
$BCD6
ADD 10
RAMWRT 14
The following shows a simple example instruction sequence that uses CoreABC to write and read to the
MSS peripherals in indirect addressing mode without Z registers.
JUMP $MAIN
$MAIN
$LOOP
APBWRT DAT 1 0x0
0x20000000
APBWRT DAT 0
0x0008 0xAB
APBREAD 0 0x0008
IOWRT ACC
JUMP $LOOP
The following shows a simple example instruction sequence that uses CoreABC to write and read to the
MSS peripherals in indirect addressing mode with Z registers.
JUMP $MAIN
$MAIN
$LOOP
APBWRT DAT 1 0x0
0x20000000
LOADZ DAT 0x0008
APBWRTZ DAT 0
0xAA
APBREADZ 0
IOWRT ACC
JUMP $LOOP
14 Instruction Summary
This section details all the CoreABC instructions. The encoding can be found in Table 20.
14.1 Instructions
14.1.1 NOP
Operation
No operation
Flags
Unchanged
Clock Cycles
3
14.1.4 INC
Operation
Increment the accumulator.
Flags
ZERO: Set if resultant value is zero. NEGATIVE: Set if resultant value is negative.
Clock Cycles
3
14.1.14 SHL0
Operation
Shift the accumulator left; LSB <= 0.
Flags
ZERO: Set if resultant value is zero. NEGATIVE: Set if resultant value is negative.
Clock Cycles
3
14.1.15 SHR0
Operation
Shift the accumulator right; MSB <= 0.
Flags
ZERO: Set if resultant value is zero.
NEGATIVE: Set if resultant value is negative (not set).
Clock Cycles
3
14.1.16 SHL1
Operation
Shift the accumulator left; LSB <= 1.
Flags
ZERO: Set if resultant value is zero (not set). NEGATIVE: Set if resultant value is negative.
Clock Cycles
3
14.1.17 SHR1
Operation
Shift the accumulator right; MSB <= 1.
Flags
ZERO: Set if resultant value is zero (not set). NEGATIVE: Set if resultant value is negative (set).
Clock Cycles
3
14.1.18 SHLE
Operation
Shift the accumulator left; LSB <= LSB.
Flags
ZERO: Set if resultant value is zero. NEGATIVE: Set if resultant value is negative.
Clock Cycles
3
14.1.19 SHRE
Operation
Shift the accumulator right; MSB <= MSB.
Flags
ZERO: Set if resultant value is zero. NEGATIVE: Set if resultant value is negative.
Clock Cycles
3
14.1.20 ROL
Operation
Rotate the accumulator left; LSB <= MSB.
Flags
ZERO: Set if resultant value is zero. NEGATIVE: Set if resultant value is negative.
Clock Cycles
3
14.1.21 ROR
Operation
Rotate the accumulator right; MSB <= LSB.
Flags
ZERO: Set if resultant value is zero. NEGATIVE: Set if resultant value is negative.
Clock Cycles
3
14.1.25 BITCLR N
Operation
Clear accumulator bit N. Uses Boolean AND.
Flags
ZERO: Set if resultant accumulator value is zero. NEGATIVE: Set if resultant accumulator value is
negative.
Clock Cycles
3
14.1.26 BITSET N
Operation
Set accumulator bit N. Uses Boolean OR.
Flags
ZERO: Set if resultant accumulator value is zero (not set). NEGATIVE: Set if resultant accumulator value
is negative.
Clock Cycles
3
14.1.27 BITTST N
Operation
Tests accumulator bit N. Uses Boolean AND.
Flags
ZERO: Set if the bit is zero. NEGATIVE: Undefined
Clock Cycles
3
14.1.41 DECZ
Operation
Decrements the Z register.
Flags
ZZERO: Set if the Z register decrements to zero.
Clock Cycles
3
14.1.42 INCZ
Operation
Increments the Z register.
Flags
ZZERO: Set if the Z register Increments to zero.
Clock Cycles
3
14.1.44 IOREAD
Operation
Load the IO_IN port value into the accumulator.
Flags
Updated
Clock Cycles
3
14.1.50 POP
Operation
Decrements the stack pointer and then loads the accumulator with the internal memory location
addressed by the stack pointer.
Flags
ZERO: Set if read value is zero. NEGATIVE: Set if read value is negative.
Clock Cycles
3
14.1.57 RETURN
Operation
Jumps to the instruction address read from the stack. The stack pointer is incremented.
Flags
Unchanged
Clock Cycles
3
14.1.59 RETISR
Operation
Jumps to the instruction address read from the stack. The stack pointer is incremented. The INTACT
output is deactivated.
Flags
Restored to the values preceding the interrupt.
Clock Cycles
3
14.1.62 HALT
Operation
Halt
Flags
Unchanged
Clock Cycles
¥