Samsung's S3C4530A 16/32-bit RISC microcontroller is a cost-effective, high-performance microcontroller
solution for Ethernet-based systems. An integrated Ethernet controller, the S3C4530A, is designed for use in
managed communication hubs and routers.
The S3C4530A is built around an outstanding CPU core: the 16/32-bit ARM7TDMI RISC processor designed by
Advanced RISC Machines, Ltd. The ARM7TDMI core is a low-power, general purpose microprocessor macro-cell
that was developed for use in application-specific and custom-specific integrated circuits. Its simple, elegant, and
fully static design is particularly suitable for cost-sensitive and power-sensitive applications.
The S3C4530A offers a configurable 8-Kbyte unified cache/SRAM and Ethernet controller which reduces total
system cost. Most of the on-chip function blocks have been designed using an HDL synthesizer and the
S3C4530A has been fully verified in Samsung's state-of-the-art ASIC test environment.
Important peripheral functions include two HDLC channels with buffer descriptor, two UART channels with full
modem interface signal and 32byte buffer, 2-channel GDMA, two 32-bit timers, and 26 programmable I/O ports.
On-board logic includes an interrupt controller, DRAM/ SDRAM controller, and a controller for ROM/SRAM and
flash memory. The System Manager includes an internal 32-bit system bus arbiter and an external memory
controller.
The following integrated on-chip functions are described in detail in this user's manual:
— 8-Kbyte unified cache/SRAM
XCLK80IS3C4530A System Clock source. If CLKSEL is Low, PLL output
clock is used as the S3C4530A internal system clock. If CLKSEL
is High, XCLK is used as the S3C4530A internal system clock.
MCLKO/SDCLK (1)77OSystem Clock Out. MCLKO is monitored as the inverting phase
of internal system clock, SCLK.
SDCLK is system clock for SDRAM
CLKSEL83IClock Select. When CLKSEL is '0'(low level), PLL output clock
can be used as the master clock. When CLKSEL is '1'(high
level), the XCLK is used as the master clock.
nRESET82INot Reset. nRESET is the global reset input for the S3C4530A.
To allow a system reset, and for internal digital filtering, nRESET
must be held to Low level for at least 64 master clock cycles.
Refer to "Figure 3. S3C4530A reset timing diagram" for more
details about reset timing.
CLKOEN76IClock Out Enable/Disable. (See the pin description for MCLKO.)
TMODE63ITest Mode. The TMODE bit settings are interpreted as follows:
'0' = normal operating mode, '1' = chip test mode.
This TMODE pin also can be used to change MF of PLL.
To get 5 times internal system clock from external clock, '0'(low
level) should be assigned to TMODE. If '1'(high level), MF will be
changed to 6.6.
FILTER55AIIf the PLL is used, 820pF capacitor should be connected between
the pin and analog ground.
TCK58IJTAG Test Clock. The JTAG test clock shifts state information
and test data into, and out of, the S3C4530A during JTAG test
operations. This pin is internally connected pull-down.
TMS59IJTAG Test Mode Select. This pin controls JTAG test operations
in the S3C4530A. This pin is internally connected pull-up.
TDI60IJTAG Test Data In. The TDI level is used to serially shift test
data and instructions into the S3C4530A during JTAG test
operations. This pin is internally connected pull-up.
TDO61OJTAG Test Data Out. The TDO level is used to serially shift test
data and instructions out of the S3C4530A during JTAG test
operations.
nTRST62IJTAG Not Reset. Asynchronous reset of the JTAG logic.
This pin is internally connected pull-up.
1-6
S3C4530APRODUCT OVERVIEW
Table 1-1. S3C4530A Signal Descriptions (Continued)
SignalPin No.TypeDescription
ADDR[21:0]/
ADDR[10]/AP (1)
117-110,
129-120,
135-132
OAddress Bus. The 22-bit address bus, ADDR[21:0], covers the full
4M word address range of each ROM/SRAM, flash memory,
DRAM, and the external I/O banks.
The 23-bit internal address bus used to generate DRAM address.
The number of column address bits in DRAM bank can be
programmed 8bits to 11bits use by DRAMCON registers.
ADDR[10]/AP is the auto pre-charge control pin. The auto precharge command is issued at the same time as burst read or
burst write by asserting high on ADDR[10]/AP.
XDATA[31:0]141-136,
154-144,
I/OExternal (bi-directional, 32-bit) Data Bus. The S3C4530A data
bus supports external 8-bit, 16-bit, and 32-bit bus sizes.
166-159,
175-169
nRAS[3:0]/
nSDCS[3:0] (1)
94, 91, 90,
89
ONot Row Address Strobe for DRAM. The S3C4530A supports up
to four DRAM banks. One nRAS output is provided for each
bank. nSDCS[3:0] are chip select pins for SDRAM.
nCAS[3:0]
nCAS[0]/nSDRAS
nCAS[1]/nSDCAS
nCAS[2]/CKE (1)
98, 97, 96,
95
ONot column address strobe for DRAM. The four nCAS outputs
indicate the byte selections whenever a DRAM bank is accessed.
nSDRAS is row address strobe signal for SDRAM. Latches row
addresses on the positive going edge of the SDCLK with
nSDRAS low. Enable row access and pre-charge. nSDCAS is
column address strobe for SDRAM. Latches column addresses
on the positive going edge of the SDCLK with nSDCAS low.
Enables column access. CKE is clock enable signal for SDRAM.
Masks SDRAM system clock, SDCLK to freeze operation from
the next clock cycle. SDCLK should be enabled at least one
cycle prior to new command. Disable input buffers of SDRAM for
power down in standby.
nDWE99ODRAM Not Write Enable. This pin is provided for DRAM bank
write operations. (nWBE[3:0] is used for write operations to the
ONot External I/O Chip Select. Four external I/O banks are
provided for external memory-mapped I/O operations. Each I/O
bank stores up to 16 Kbytes. nECS signals indicate which of the
four external I/O banks is selected.
nEWAIT71INot External Wait. This signal is activated when an external I/O
device or ROM/SRAM/flash bank 0 to 5 needs more access
cycles than those defined in the corresponding control register.
1-7
PRODUCT OVERVIEWS3C4530A
Table 1-1. S3C4530A Signal Descriptions (Continued)
SignalPin No.TypeDescription
nRCS[5:0]88, 84, 75ONot ROM/SRAM/Flash Chip Select. The S3C4530A can access
up to six external ROM/SRAM/Flash banks. By controlling the
nRCS signals, you can map CPU addresses into the physical
memory banks.
B0SIZE[1:0]74, 73IBank 0 Data Bus Access Size. Bank 0 is used for the boot
program. You use these pins to set the size of the bank 0 data
bus as follows: '01' = one byte, '10' = half-word, '11' = one word,
and '00' = reserved.
nOE72ONot Output Enable. Whenever a memory access occurs, the nOE
output controls the output enable port of the specific memory
device.
nWBE[3:0]/
DQM[3:0] (1)
107,
102, 100
ONot Write Byte Enable. Whenever a memory write access
occurs, the nWBE output controls the write enable port of the
specific memory device (except for DRAM). For DRAM banks,
CAS[3:0] and nDWE are used for the write operation.
DQM is data input/output mask signal for SDRAM.
ExtMREQ108IExternal Bus Master Request. An external bus master uses this
pin to request the external bus. When it activates the ExtMREQ
signal, the S3C4530A drives the state of external bus pins to high
impedance. This lets the external bus master take control of the
external bus. When it has the control, the external bus master
assumes responsibility for DRAM refresh operations. The
ExtMREQ signal is deactivated when the external bus master
releases the external bus. When this occurs, ExtMACK goes Low
level and the S3C4530A assumes the control of the bus.
ExtMACK109OExternal Bus Acknowledge. (See the ExtMREQ pin description.)
MDC50OManagement Data Clock. The signal level at the MDC pin is used
as a timing reference for data transfers that are controlled by the
MDIO signal.
MDIO48I/OManagement Data I/O. When a read command is being
executed, data that is clocked out of the PHY is presented on this
pin. When a write command is being executed, data that is
clocked out of the controller is presented on this pin for the
Physical Layer Entity, PHY.
LITTLE49ILittle endian mode selection pin. If LITTLE is High, S3C4530A
operate in little endian mode. If Low, then in Big endian mode.
Default value is low because this pin is pull-downed internally.
COL/COL_10M38ICollision Detected/Collision Detected for 10M. COL is asserted
asynchronously with minimum delay from the start of a collision
on the medium in MII mode. COL_10M is asserted when a 10-
Mbit/s PHY detects a collision.
1-8
S3C4530APRODUCT OVERVIEW
Table 1-1. S3C4530A Signal Descriptions (Continued)
SignalPin No.TypeDescription
TX_CLK/
TXCLK_10M
46ITransmit Clock/Transmit Clock for 10M. The controller drives
TXD[3:0] and TX_EN from the rising edge of TX_CLK. In MII
mode, the PHY samples TXD[3:0] and TX_EN on the rising edge
of TX_CLK. For data transfers, TXCLK_10M is provided by the
10-Mbit/s PHY.
TXD[3:0]
LOOP_10M
TXD_10M
44, 43,
40, 39
OTransmit Data/Transmit Data for 10M/Loop-back for 10M.
Transmit data is aligned on nibble boundaries. TXD[0]
corresponds to the first bit to be transmitted on the physical
medium, which is the LSB of the first byte and the fifth bit of that
byte during the next clock. TXD_10M is shared with TXD[0] and
is a data line for transmitting to the 10-Mbit/s PHY. LOOP_10M is
shared with TXD[1] and is driven by the loop-back bit in the
control register.
TX_EN/
TXEN_10M
47OTransmit Enable/Transmit Enable for 10M. TX_EN provides
precise framing for the data carried on TXD[3:0]. This pin is
active during the clock periods in which TXD[3:0] contains valid
data to be transmitted from the preamble stage through CRC.
When the controller is ready to transfer data, it asserts
TXEN_10M.
TX_ERR/
PCOMP_10M
45OTransmit Error/Packet Compression Enable for 10M. TX_ERR is
driven synchronously to TX_CLK and sampled continuously by
the Physical Layer Entity, PHY. If asserted for one or more
TX_CLK periods, TX_ERR causes the PHY to emit one or more
symbols which are not part of the valid data, or delimiter set
located somewhere in the frame that is being transmitted.
PCOMP_10M is asserted immediately after the packet’ s DA field
is received. PCOMP_10M is used with the Management Bus of
the DP83950 Repeater Interface Controller (from National
Semiconductor). The MAC can be programmed to assert
PCOMP if there is a CAM match, or if there is not a match. The
RIC (Repeater Interface Controller) uses this signal to compress
(shorten) the packet received for management purposes and to
reduce memory usage. (See the DP83950 Data Sheet, published
by National Semiconductor, for details on the RIC Management
Bus.) This pin is controlled by a special register, with which you
can define the polarity and assertion method (CAM match active
or not match active) of the PCOMP signal.
CRS/CRS_10M28ICarrier Sense/Carrier Sense for 10M. CRS is asserted
asynchronously with minimum delay from the detection of a nonidle medium in MII mode. CRS_10M is asserted when a 10Mbit/s PHY has data to transfer. A 10-Mbit/s transmission also
uses this signal.
RX_CLK/
RXCLK_10M
37IReceive Clock/Receive Clock for 10M. RX_CLK is a continuous
clock signal. Its frequency is 25 MHz for 100-Mbit/s operation,
and 2.5 MHz for 10-Mbit/s. RXD[3:0], RX_DV, and RX_ERR are
driven by the PHY off the falling edge of RX_CLK, and sampled
on the rising edge of RX_CLK. To receive data, the RXCLK_10 M
clock comes from the 10Mbit/s PHY.
1-9
PRODUCT OVERVIEWS3C4530A
Table 1-1. S3C4530A Signal Descriptions (Continued)
SignalPin No.TypeDescription
RXD[3:0]/
RXD_10M
35, 34,
33, 30
IReceive Data/Receive Data for 10M. RXD is aligned on nibble
boundaries. RXD[0] corresponds to the first bit received on the
physical medium, which is the LSB of the byte in one clock
period and the fifth bit of that byte in the next clock. RXD_10M is
shared with RXD[0] and it is a line for receiving data from the 10-
Mbit/s PHY.
RX_DV/LINK_10M29IReceive Data Valid/Link Status for 10M. PHY asserts RX_DV
synchronously, holding it active during the clock periods in which
RXD[3:0] contains valid data received. PHY asserts RX_DV no
later than the clock period when it places the first nibble of the
start frame delimiter (SFD) on RXD[3:0]. If PHY asserts RX_DV
prior to the first nibble of the SFD, then RXD[3:0] carries valid
preamble symbols. LINK_10M is shared with RX_DV and used to
convey the link status of the 10-Mbit/s endec. The value is stored
in a status register.
RX_ERR36IReceive Error. PHY asserts RX_ERR synchronously whenever it
detects a physical medium error (e.g., a coding violation). PHY
asserts RX_ERR only when it asserts RX_DV.
TXDA9OHDLC Ch-A Transmit Data. The serial output data from the
transmitter is coded in NRZ/NRZI/FM/Manchester data format.
RXDA7IHDLC Ch-A Receive Data. The serial input data received by the
device should be coded in NRZ/NRZI/FM/Manchester data
format. The data rate should not exceed the rate of the
S3C4530A internal master clock.
nDTRA6OHDLC Ch-A Data Terminal Ready. nDTRA output indicates that
the data terminal device is ready for transmission and reception.
nRTSA8OThe nRTS pin goes low at that time the data into the TxFIFO.
And this pin output state can be controlled directly using RTS bit
in TCON register. If this bit set to one, nRTS goes low state.
If the AutoEn bit set to one, the data in TxFIFO can be
transmitted only when the nCTS state has low. If AutoEn bit set
to zero, the data in TxFIFO can be transmitted irrespective of the
nCTS state.
nCTSA10IHDLC Ch-A Clear To Send. The S3C4530A stores each
transition of nCTS to ensure that its occurrence would be
acknowledged by the system. If AutoEn bit set to one, it is
possible to transmit data only when nCTS active state.
nDCDA13IHDLC Ch-A Data Carrier Detected. If AutoEn bit is set to one,
high level on this pin resets and inhibits the receiver register.
Data from a previous frame that may remain in the RxFIFO is
retained. The S3C4530A stores each transition of nDCD. If
AutoEn bit set to one, it is possible to receive data only when
nDCD active state.
nSYNCA15OHDLC Ch-A Sync is detected. This indicates the reception of a
flag. The nSYNC output goes low for one bit time beginning at
the last bit of the flag.
1-10
S3C4530APRODUCT OVERVIEW
Table 1-1. S3C4530A Signal Descriptions (Continued)
SignalPin No.TypeDescription
RXCA14IHDLC Ch-A Receiver Clock. When this clock input is used as the
receiver clock, the receiver samples the data on the positive
edge of RXCA clock. It is possible to samples the data on the
negative edge by register setting. This clock can be the source
clock of the receiver, the baud rate generator, or the DPLL.
TXCA16I/OHDLC Ch-A Transmitter Clock. When this clock input is used as
the transmitter clock, the transmitter shifts data on the negative
transition of the TXCA clock . It is possible to samples the data
on the positive edge by register setting. If you do not use TXCA
as the transmitter clock, you can use it as an output pin for
monitoring internal clocks such as the transmitter clock, receiver
clock, and baud rate generator output clocks.
TXDB20OHDLC Ch-B Transmit Data. See the TXDA pin description.
RXDB18IHDLC Ch-B Receive Data. See the RXDA pin description.
nDTRB17OHDLC Ch-B Data Terminal Ready. See the nDTRA pin
description.
nRTSB19OHDLC Ch-B Request To Send. See the nRTSA pin description.
nCTSB23IHDLC Ch-B Clear To Send. See the nCTSA pin description.
nDCDB24IHDLC Ch-B Data Carrier Detected. See the nDCDA pin
description.
nSYNCB26OHDLC Ch-B Sync is detected. See the nSYNCA pin description.
RXCB25IHDLC Ch-B Receiver Clock. See the RXCA pin description.
TXCB27I/OHDLC Ch-B Transmitter Clock. See the TXCA pin description.
UCLK64IThe external UART clock input. MCLK or PLL generated clock
can be used as the UART clock. You can use UCLK, with an
appropriate divided by factor, if a very precious baud rate clock is
required.
UARXD0/P[18]202I/BUART0 Receive Data. RXD0 is the UART0 input signal for
receiving serial data. This pin can be used general I/O port also.
It can be controlled by IOPCON register. See chapter 12.
UATXD0/P[20]204O/BUART0 Transmit Data. TXD0 is the UART0 output signal for
transmitting serial data. This pin can be used general I/O port
also. It can be controlled by IOPCON register. See chapter 12.
nUADSR0/P[19]203I/BNot UART0 Data Set Ready. This input signals in the UART0 that
the peripheral (or host) is ready to transmit or receive serial data.
See chapter 10.
nUADTR0/P[21]205O/BNot UART0 Data Terminal Ready. This output signals the host
(or peripheral) that UART0 is ready to transmit or receive serial
data. This pin output state can be controlled by UART0 control
register.
1-11
PRODUCT OVERVIEWS3C4530A
Table 1-1. S3C4530A Signal Descriptions (Continued)
SignalPin No.TypeDescription
nUADCD0/P[2]180I/BThis input pin function is determined by hardware flow control bit
value in UART control register. If hardware flow control bit set to
one, UART can receive the receiving data only when this pin
state is active.
nUACTS0/P[3]181I/BThis input pin function controlled by hardware flow control bit
value in UART control register. If hardware flow control bit set to
one, UART can transmit the transmitting data only when this pin
state is active.
nUARTS0/P[4]182O/BThis pin output state goes Low or High according to the transmit
data is in Tx buffer or Tx FIFO when hardware flow control bit
value set to one in UART control register. If Tx buffer or Tx FIFO
has data to send, this pin state goes low. If hardware flow control
bit is zero, this pin output can be controlled directly by UART
Table 1-1. S3C4530A Signal Descriptions (Continued)
SignalPin No.TypeDescription
P[1:0]179, 176I/OGeneral I/O ports. See the I/O ports, chapter 12.
XINTREQ[3:0]
P[11:8]
nXDREQ[1:0]/
P[13:12]
nXDACK[1:0]
P[15:14]
191 - 189,
186
I/OExternal interrupt request lines or general I/O ports.
See the I/O ports, chapter 12.
193, 192I/ONot External DMA requests for GDMA or general I/O ports.
See the I/O ports, chapter 12.
195, 194I/ONot External DMA acknowledge from GDMA or general I/O ports.
See the I/O ports, chapter 12.
TOUT0/P[16]196I/OTimer 0 out or general I/O port. See the I/O ports, chapter 12.
TOUT1/P[17]199I/OTimer 1 out or general I/O port. See the I/O ports, chapter 12.
SCL200I/OI2C serial clock.
SDA201I/OI2C serial data.
VDDP1, 21, 41,
PowerI/O pad power
56, 78, 92,
105, 118,
130, 155,
167, 177,
197
VDDI11, 31, 51,
PowerInternal core power
65, 103,
142, 157,
187, 207
TMS1IpticuJTAG test mode select.
TDI1IpticuJTAG test data in.
TDO1Optot2JTAG test data out.
nTRST1IpticuJTAG not reset.
MemoryADDR[21:0]22Optot6Address bus.
Interface
(83)
XDATA[31:0]32I/Optbsut6External, bi-directional, 32-bit data bus.
nRAS[3:0]4Optot4Not row address strobe for DRAM.
nCAS[3:0]4Optot4Not column address strobe for DRAM.
nDWE1Optot4Not write enable for DRAM.
nECS[3:0]4Optot4Not external I/O chip select.
nEWAIT1IpticNot external wait signal.
nRCS[5:0]6Optot4Not ROM/SRAM/flash chip select.
B0SIZE[1:0]2IpticBank 0 data bus access size.
nOE1Optot4Not output enable.
nWBE[3:0]4Optot4Not write byte enable.
ExtMREQ1IpticExternal master bus request.
ExtMACK1Opob1External bus acknowledge.
1-14
S3C4530APRODUCT OVERVIEW
Table 1-2. S3C4530A Pin List and PAD Type (Continued)
GroupPin NamePin
Ethernet
Controller
MDC1Opob4Management data clock.
MDIO1I/Optbcut4 Management data I/O.
Counts
I/O
Type
Pad
Type
Description
(18)COL/ COL_10M1IptisCollision detected/collision detected for
10M.
TX_CLK/ TXCLK_10M1IptisTransmit data/transmit data for 10M.
TXD[3:0]/TXD_10M4Opob4Transmit data/transmit data for 10M.
TX_EN/ TXEN_10M1Opob4Transmit enable or transmit enable for
enable for 10M.
CRS/ CRS_10M1IptisCarrier sense/carrier sense for 10M.
RX_CLK/ RXCLK_10M1IptisReceive clock/receive clock for 10M.
RXD[3:0]/ RXD_10M4IptisReceive data/receive data for 10M.
RX_DV/ LINK_10M1IptisReceive data valid.
RX_ERR1IptisReceive error.
HDLCTXDA1Opob4HDLC channel A transmit data.
Channel A
(9)
RXDA1IptisHDLC channel A receive data.
nDTRA1Opob4HDLC channel A data terminal ready.
nRTSA1Opob4HDLC channel A request to send.
nCTSA1IptisHDLC channel A clear to send.
nDCDA1IptisHDLC channel A data carrier detected.
nSYNCA1Opob4HDLC channel A sync is detected.
RXCA1IptisHDLC channel A receiver clock.
TXCA1I/Optbsut1 HDLC channel A transmitter clock.
HDLCTXDB1Opob4HDLC channel B transmit data.
Channel B
(9)
RXDB1IptisHDLC channel B receive data.
nDTRB1Opob4HDLC channel B data terminal ready.
nRTSB1Opob4HDLC channel B request to send.
nCTSB1IptisHDLC channel B clear to send.
nDCDB1IptisHDLC channel B data carrier detected.
nSYNCB1Opob4HDLC channel B sync is detected.
RXCB1IptisHDLC channel B receiver clock.
TXCB1I/Optbsut1 HDLC channel B transmitter clock.
1-15
PRODUCT OVERVIEWS3C4530A
Table 1-2. S3C4530A Pin List and PAD Type (Continued)
NOTE: pticu and pticd provides 100K Ohm Pull-up(down) register. For detail information about the pad type,
see Chapter 4. Input/Output Cells of the "STD90/MDL90 0.35um 3.3V Standard Cell Library Data Book",
produced by Samsung Electronics Co., Ltd, ASIC Team
nRESET
64*fMCLK512*fMCLK
nRSCO
NOTE: After the falling edge of nRESET, the S3C4530A count 64 cycles for a system reset
and needs further 512 cycles for a TAG RAM clear of cache.
After these cycles, the S3C4530A asserts nRCS0 when the nRESET is released.
Figure 1-3. Reset Timing Diagram
1-17
PRODUCT OVERVIEWS3C4530A
CPU CORE OVERVIEW
The S3C4530A CPU core is a general purpose 32-bit ARM7TDMI microprocessor, developed by Advanced RISC
Machines, Ltd. (ARM). The core architecture is based on Reduced Instruction Set Computer (RISC) principles.
The RISC architecture makes the instruction set and its related decoding mechanism simpler and more efficient
than those with microprogrammed Complex Instruction Set Computer (CISC) systems. High instruction
throughput and impressive real-time interrupt response are among the major benefits of the architecture.
Pipelining is also employed so that all components of the processing and memory systems can operate
continuously. The ARM7TDMI has a 32-bit address bus.
An important feature of the ARM7TDMI processor that makes itself distinct from the ARM7 processor is a unique
architectural strategy called THUMB. The THUMB strategy is an extension of the basic ARM architecture
consisting of 36 instruction formats. These formats are based on the standard 32-bit ARM instruction set, while
having been re-coded using 16-bit wide opcodes.
As THUMB instructions are one-half the bit width of normal ARM instructions, they produce very high-density
codes. When a THUMB instruction is executed, its 16-bit opcode is decoded by the processor into its equivalent
instruction in the standard ARM instruction set. The ARM core then processes the 16-bit instruction as it would a
normal 32-bit instruction. In other words, the THUMB architecture gives 16-bit systems a way to access the 32-bit
performance of the ARM core without requiring the full overhead of 32-bit processing.
As the ARM7TDMI core can execute both standard 32-bit ARM instructions and 16-bit THUMB instructions, it
allows you to mix the routines of THUMB instructions and ARM code in the same address space. In this way, you
can adjust code size and performance, routine by routine, to find the best programming solution for a specific
application.
Address
Register
Address
Incrementer
Instruction
Register Bank
Multiplier
Barrel
Shifter
32-BIT ALU
Write Data
Register
Decoder and
Logic Controll
Instruction
Pipeline and Read
Data Register
1-18
Figure 1-4. ARM7TDMI Core Block Diagram
S3C4530APRODUCT OVERVIEW
INSTRUCTION SET
The S3C4530A instruction set is divided into two subsets: a standard 32-bit ARM instruction set and a 16-bit
THUMB instruction set.
The 32-bit ARM instruction set is comprised of thirteen basic instruction types, which can, in turn, be divided into
four broad classes:
•Four types of branch instructions which control program execution flow, instruction privilege levels, and
switching between an ARM code and a THUMB code.
•Three types of data processing instructions which use the on-chip ALU, barrel shifter, and multiplier to
perform high-speed data operations in a bank of 31 registers (all with 32-bit register widths).
•Three types of load and store instructions which control data transfer between memory locations and the
registers. One type is optimized for flexible addressing, another for rapid context switching, and the third for
swapping data.
•Three types of co-processor instructions which are dedicated to controlling external co-processors. These
instructions extend the off-chip functionality of the instruction set in an open and uniform way.
NOTE
All 32-bit ARM instructions can be executed conditionally.
The 16-bit THUMB instruction set contains 36 instruction formats drawn from the standard 32-bit ARM instruction
set. The THUMB instructions can be divided into four functional groups:
•Four branch instructions.
•Twelve data processing instructions, which are a subset of the standard ARM data processing instructions.
•Eight load and store register instructions.
•Four load and store multiple instructions.
NOTE
Each 16-bit THUMB instruction has a corresponding 32-bit ARM instruction with an identical processing
model.
The 32-bit ARM instruction set and the 16-bit THUMB instruction set are good targets for compilers of many
different high-level languages. When an assembly code is required for critical code segments, the ARM
programming technique is straightforward, unlike that of some RISC processors which depend on sophisticated
compiler technology to manage complicated instruction interdependencies.
Pipelining is employed so that all parts of the processor and memory systems can operate continuously.
Typically, while one instruction is being executed, its successor is being decoded, and the third instruction is
being fetched from memory.
1-19
PRODUCT OVERVIEWS3C4530A
MEMORY INTERFACE
The CPU memory interface has been designed to help the highest performance potential to be realized without
incurring high costs in the memory system. Speed-critical control signals are pipelined so that system control
functions can be implemented in standard low-power logic. These pipelined control signals allow you to fully
exploit the fast local access modes, offered by industry standard dynamic RAMs.
OPERATING STATES
From a programmer′s point of view, the ARM7TDMI core is always in one of two operating states. These states,
which can be switched by software or by exception processing, are:
•ARM state (when executing 32-bit, word-aligned, ARM instructions), and
• THUMB state (when executing 16-bit, half-word aligned THUMB instructions).
OPERATING MODES
The ARM7TDMI core supports seven operating modes:
•User mode: a normal program execution state
•FIQ (Fast Interrupt Request) mode: for supporting a specific data transfer or channel processing
•IRQ (Interrupt Request) mode: for general purpose interrupt handling
•Supervisor mode: a protected mode for the operating system
•Abort mode: entered when a data or instruction pre-fetch is aborted
•System mode: a privileged user mode for the operating system
•Undefined mode: entered when an undefined instruction is executed
Operating mode changes can be controlled by software. They can also be caused by external interrupts or
exception processing. Most application programs execute in user mode. Privileged modes (that is, all modes
other than User mode) are entered to service interrupts or exceptions, or to access protected resources.
1-20
S3C4530APRODUCT OVERVIEW
REGISTERS
The S3C4530A CPU core has a total of 37 registers: 31 general-purpose 32-bit registers, and 6 status registers.
Not all of these registers are always available. Whether a registers is available to the programmer at any given
time depends on the current processor operating state and mode.
NOTE
When the S3C4530A is operating in ARM state, 16 general registers and one or two status registers can
be accessed at any time. In privileged mode, mode-specific banked registers are switched in.
Two register sets, or banks, can also be accessed, depending on the core′s current state, the ARM state registerset and the THUMB state register set:
•The ARM state register set contains 16 directly accessible registers: R0-R15. All of these registers, except for
R15, are for general-purpose use, and can hold either data or address values. An additional (17th) register,
the CPSR (Current Program Status Register), is used to store status information.
•The THUMB state register set is a subset of the ARM state set. You can access 8 general registers, R0-R7,
as well as the program counter (PC), a stack pointer register (SP), a link register (LR), and the CPSR. Each
privileged mode has a corresponding banked stack pointer, link register, and saved process status register
(SPSR).
The THUMB state registers are related to the ARM state registers as follows:
•THUMB state R0-R7 registers and ARM state R0-R7 registers are identical
•THUMB state CPSR and SPSRs and ARM state CPSR and SPSRs are identical
•THUMB state SP, LR, and PC are mapped directly to ARM state registers R13, R14, and R15, respectively
In THUMB state, registers R8-R15 are not part of the standard register set. However, you can access them for
assembly language programming and use them for fast temporary storage, if necessary.
1-21
PRODUCT OVERVIEWS3C4530A
EXCEPTIONS
An exception arises when the normal flow of program execution is interrupted, e.g., when processing is diverted
to handle an interrupt from a peripheral. The processor state just prior to handling the exception must be
preserved so that the program flow can be resumed when the exception routine is completed. Multiple exceptions
may arise simultaneously.
To process exceptions, the S3C4530A uses the banked core registers to save the current state. The old PC value
and the CPSR contents are copied into the appropriate R14 (LR) and SPSR registers The PC and mode bits in
the CPSR are adjusted to the value corresponding to the type of exception being processed.
The S3C4530A core supports seven types of exceptions. Each exception has a fixed priority and a corresponding
privileged processor mode, as shown in Table 1-4.
SystemSYSCFG0x0000R/WSystem configuration register0x4FFFFF91
ManagerCLKCON0x3000R/WClock control register0x00000000
EXTACON00x3008R/WExternal I/O timing register 10x00000000
EXTACON10x300CR/WExternal I/O timing register 20x00000000
EXTDBWTH0x3010R/WData bus width for each memory bank0x00000000
ROMCON00x3014R/WROM/SRAM/Flash bank 0 control register0x20000060
ROMCON10x3018R/WROM/SRAM/Flash bank 1 control register0x00000060
ROMCON20x301CR/WROM/SRAM/Flash bank 2 control register0x00000060
ROMCON30x3020R/WROM/SRAM/Flash bank 3 control register0x00000060
ROMCON40x3024R/WROM/SRAM/Flash bank 4 control register0x00000060
ROMCON50x3028R/WROM/SRAM/Flash bank 5 control register0x00000060
DRAMCON00x302CR/WDRAM bank 0 control register0x00000000
DRAMCON10x3030R/WDRAM bank 1 control register0x00000000
DRAMCON20x3034R/WDRAM bank 2 control register0x00000000
DRAMCON30x3038R/WDRAM bank 3 control register0x00000000
REFEXTCON0x303CR/WRefresh and external I/O control register0x000083ED
EthernetBDMATXCON 0x9000R/WBuffered DMA receive control register0x00000000
(BDMA)BDMARXCON 0x9004R/WBuffered DMA transmit control register0x00000000
BDMARXLSZ0x9010R/WReceive frame maximum sizeUndefined
BDMASTAT0x9014R/WBuffered DMA status0x00000000
CAM0x9100-
0x917C
BDMATXBUF0x9200-
0x92FC
BDMARXBUF 0x9800-
0x99FC
EthernetMACON0xA000R/WEthernet MAC control register0x00000000
(MAC)CAMCON0xA004R/WCAM control register0x00000000
MACTXCON0xA008R/WMAC transmit control register0x00000000
MACTXSTAT0xA00CR/WMAC transmit status register0x00000000
MACRXCON0xA010R/WMAC receive control register0x00000000
MACRXSTAT0xA014R/WMAC receive status register0x00000000
WCAM content (32 words)Undefined
R/WBDMA Tx buffer (64 words) for test mode
addressing
R/WBDMA Rx buffer (64 words) for test mode
addressing
Undefined
Undefined
1-23
PRODUCT OVERVIEWS3C4530A
Table 1-5. S3C4530A Special Registers (Continued)
GroupRegistersOffsetR/WDescriptionReset/Value
EthernetSTADATA0xA018R/WStation management data0x00000000
(MAC)STACON0xA01CR/WStation management control and address0x00006000
ETXSTAT0x9040RTransmit control frame status0x00000000
HDLCHMODE0x7000R/WHDLC mode register0x00000000
Channel A HCON0x7004R/WHDLC control register0x00000000
TCON0x704CR/WTransparent Control Register0x00000000
HDLCHMODE0x8000R/WHDLC mode register0x00000000
Channel B HCON0x8004R/WHDLC control register0x00000000
I/O PortsIOPMOD0x5000R/WI/O port mode register0x00000000
IOPCON0x5004R/WI/O port control register0x00000000
IOPDATA0x5008R/WInput port data register0x00000000
InterruptINTMOD0x4000R/WInterrupt mode registerUndefined
ControllerINTPND0x4004R/WInterrupt pending register0x00000000
GDMADST10xC008R/WGDMA destination address register 1Undefined
GDMACNT00xB00CR/WGDMA channel 0 transfer count registerUndefined
GDMACNT10xC00CR/WGDMA channel 1 transfer count registerUndefined
UARTUCON00xD000R/WUART channel 0 control register0x00
UCON10xE000R/WUART channel 1 control register0x00
USTAT00xD004R/WUART channel 0 status register0xE0240
USTAT10xE004R/WUART channel 1 status register0xE0240
UINTEN00xD008R/WUART channel 0 interrupt enable register0x00000000
UINTEN10xE008R/WUART channel 1 interrupt enable register0x00000000
UTXBUF00xD00CWUART channel 0 transmit holding registerUndefined
UTXBUF10xE00CWUART channel 1 transmit holding registerUndefined
URXBUF00xD010RUART channel 0 receive buffer registerUndefined
URXBUF10xE010RUART channel 1 receive buffer registerUndefined
UBRDIV00xD014R/WBaud rate divisor register 00x00
UBRDIV10xE014R/WBaud rate divisor register 10x00
UCC1_00xD018R/WUART0 Control Character Register 10x00000000
UCC1_10xE018R/WUART1 Control Character Register 10x00000000
UCC2_00xD01CR/WUART0 Control Character Register 20x00000000
UCC2_10xE01CR/WUART1 Control Character Register 20x00000000
TimersTMOD0x6000R/WTimer mode register0x00000000
TDATA00x6004R/WTimer 0 data register0x00000000
TDATA10x6008R/WTimer 1 data register0x00000000
TCNT00x600CR/WTimer 0 count register0xffffffff
TCNT10x6010R/WTimer 1 count register0xffffffff
1-26
S3C4530APROGRAMMER'S MODEL
2PROGRAMMER′′S MODEL
OVERVIEW
S3C4530A was developed using the advanced ARM7TDMI core designed by advanced RISC machines, Ltd.
Processor Operating States
From the programmer′s point of view, the ARM7TDMI can be in one of two states:
— ARM state which executes 32-bit, word-aligned ARM instructions.
— THUMB state which operates with 16-bit, half-word-aligned THUMB instructions. In this state, the PC uses bit
1 to select between alternate half-words.
NOTE
Transition between these two states does not affect the processor mode or the contents of the registers.
SWITCHING STATE
Entering THUMB State
Entry into THUMB state can be achieved by executing a BX instruction with the state bit (bit 0) set in the operand
register.
Transition to THUMB state will also occur automatically on return from an exception (IRQ, FIQ, UNDEF, ABORT,
SWI etc.), if the exception was entered with the processor in THUMB state.
Entering ARM State
Entry into ARM state happens:
1. On execution of the BX instruction with the state bit clear in the operand register.
2. On the processor taking an exception (IRQ, FIQ, RESET, UNDEF, ABORT, SWI etc.). In this case, the PC is
placed in the exception mode′s link register, and execution commences at the exception′s vector address.
MEMORY FORMATS
ARM7TDMI views memory as a linear collection of bytes numbered upwards from zero. Bytes 0 to 3 hold the first
stored word, bytes 4 to 7 the second and so on. ARM7TDMI can treat words in memory as being stored either in
Big-Endian or Little-Endian format.
2-1
PROGRAMMER'S MODELS3C4530A
BIG-ENDIAN FORMAT
In Big-Endian format, the most significant byte of a word is stored at the lowest numbered byte and the least
significant byte at the highest numbered byte. Byte 0 of the memory system is therefore connected to data lines
31 through 24.
Higher address
Lower address
31
24
8
4
0
wMost significant byte is at lowest address
wWord is addressed by byte address of most signficant byte
9158 70Word address
5
9
5
1
10
11
6
2
7
3
8
4
0
Figure 2-1. Big-Endian Addresses of Bytes within Words
NOTE
The data locations in the external memory are different with Figure 2-1 in the S3C4620. Please refer to
the chapter 4, system manager.
LITTLE-ENDIAN FORMAT
In Little-Endian format, the lowest numbered byte in a word is considered the word′s least significant byte, and
the highest numbered byte the most significant. Byte 0 of the memory system is therefore connected to data lines
7 through 0.
2-2
Higher address
Lower address
31
24
11
7
3
wMost significant byte is at lowest address
wWord is addressed by byte address of least signficant byte
23158 70
16
10
6
2
9
5
1
8
4
0
Figure 2-2. Little-Endian Addresses of Bytes Words
Word address
8
4
0
S3C4530APROGRAMMER'S MODEL
INSTRUCTION LENGTH
Instructions are either 32 bits long (in ARM state) or 16 bits long (in THUMB state).
DataTypes
ARM7TDMI supports byte (8-bit), half-word (16-bit) and word (32-bit) data types. Words must be aligned to fourbyte boundaries and half words to two-byte boundaries.
OPERATING MODES
ARM7TDMI supports seven modes of operation:
— User (usr):The normal ARM program execution state
— FIQ (fiq):Designed to support a data transfer or channel process
— IRQ (irq): Used for general-purpose interrupt handling
— Supervisor (svc):Protected mode for the operating system
— Abort mode (abt):Entered after a data or instruction prefetch abort
— System (sys):A privileged user mode for the operating system
— Undefined (und): Entered when an undefined instruction is executed
Mode changes may be made under software control, or may be brought about by external interrupts or exception
processing. Most application programs will execute in User mode. The non-user modes known as privileged
modes-are entered in order to service interrupts or exceptions, or to access protected resources.
2-3
PROGRAMMER'S MODELS3C4530A
REGISTERS
ARM7TDMI has a total of 37 registers-31 general-purpose 32-bit registers and six status registers - but these
cannot all be seen at once. The processor state and operating mode dictate which registers are available to the
programmer.
The ARM State Register Set
In ARM state, 16 general registers and one or two status registers are visible at any one time. In privileged (nonUser) modes, mode-specific banked registers are switched in. Figure 2-3 shows which registers are available in
each mode: the banked registers are marked with a shaded triangle.
The ARM state register set contains 16 directly accessible registers: R0 to R15. All of these except R15 are
general-purpose, and may be used to hold either data or address values. In addition to these, there is a
seventeenth register used to store status information.
Register 14is used as the subroutine link register. This receives a copy of R15 when a branch
and link (BL) instruction is executed. At all other times it may be treated as a
general-purpose register. The corresponding banked registers R14_svc, R14_irq,
R14_fiq, R14_abt and R14_und are similarly used to hold the return values of
R15 when interrupts and exceptions arise, or when branch and link instructions are
executed within interrupt or exception routines.
Register 15
holds the Program Counter (PC). In ARM state, bits [1:0] of R15 are zero and bits
[31:2] contain the PC. In THUMB state, bit [0] is zero and bits [31:1] contain the PC.
Register 16
is the CPSR (Current Program Status Register). This contains condition code flags
and the current mode bits.
FIQ mode has seven banked registers mapped to R8-14 (R8_fiq-R14_fiq). In ARM state, many FIQ handlers do
not need to save any registers. User, IRQ, Supervisor, Abort and Undefined each have two banked registers
mapped to R13 and R14, allowing each of these modes to have a private stack pointer and link registers.
2-4
Loading...
+ 402 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.