SRAM and FIFO Memories in Actel’s Low-Power Flash Devices
v1.1
6 - 19
counter. Using a counter to generate the address bits and sweep through the address range of the
RAM blocks is recommended, since it reduces the complexity of the user interface block and the
board-level JTAG driver.
Moreover, using an internal counter for address generation speeds up the initialization procedure,
since the user only needs to import the data through the JTAG port.
The designer may use different methods to select among the multiple RAM blocks. Using counters
along with demultiplexers is one approach to set the write enable signals. Basically, the number of
RAM blocks needing initialization determines the most efficient approach. For example, if all the
blocks are initialized with the same data, one enable signal is enough to activate the write
procedure for all of them at the same time. Another alternative is to use different opcodes to
initialize each memory block. For a small number of RAM blocks, using counters is an optimal
choice. For example, a ring counter can be used to select from multiple RAM blocks. The clock
driver of this counter needs to be controlled by the address generation process.
Once the addressing of one block is finished, a clock pulse is sent to the (ring) counter to select the
next memory block.
Figure 6-9 illustrates a simple block diagram of an interface block between UJTAG and RAM blocks.
In the circuit shown in
Figure 6-9, the shift register is enabled by the UDRSH output of the UJTAG
macro. The counters and chip select outputs are controlled by the value of the TAP Instruction
Register. The comparison block compares the UIREG value with the "start initialization" opcode
value (defined by the user). If the result is true, the counters start to generate addresses and
activate the WEN inputs of appropriate RAM blocks.
The UDRUPD output of the UJTAG macro, also shown in
Figure 6-9, is used for generating the write
clock (WCLK) and synchronizing the data register and address counter with WCLK. UDRUPD is HIGH
when the TAP Controller is in the Data Register Update state, which is an indication of completing
the loading of one data word. Once the TAP Controller goes into the Data Register Update state,
the UDRUPD output of the UJTAG macro goes HIGH. Therefore, the pipeline register and the
address counter place the proper data and address on the outputs of the interface block.
Meanwhile, WCLK is defined as the inverted UDRUPD. This will provide enough time (equal to the
UDRUPD HIGH time) for the data and address to be placed at the proper ports of the RAM block
before the rising edge of WCLK. The inverter is not required if the RAM blocks are clocked at the
falling edge of the write clock. An example of this is described in the
"Example of RAMFigure 6-9 Block Diagram of a Sample User Interface
n
m
UTDI
UDRSH
UDRCK
UTDO
UDRUPDI
UIREG
URSTB
CLK
Enable
SIN
Serial-to-Port Shift Register
POUT
SOUT
D
En
Reset
CLK
En
Reset
CLK
Q
CLK
WDATA
WCLK
WEN1
WEN2
WENi
WADDR
Chip Select
Data Reg.
Addr Counter
Ring
Counter
Binary
Counter
Compare
with
Defined Opcode
In
Result