Академический Документы
Профессиональный Документы
Культура Документы
Students Instructors
Overview of IC design
RTL Design
Specification
Signal Descriptions
Symbol Descriptions
CS# Chip select, transactions are initiated with CS#
HighLow, terminated with Low High
CK, CK# Differential Clock
RWDS Read Write Data Strobe, Output data during read
transactions are edge aligned with RWDS.
DQ[7:0] Data Input / Output. Command / Address / Data
information is transferred on these DQs during read
and write transactions
INT# Interrupt output
RESET# Hardware Reset. When Low, the device will self
initiaize and return to the array read state. RWDS and
DQ[7:0] are placed into the High-Z state when RESET#
is Low
RSTO# Reset output
Vcc Core power
VccQ Input/ Output power
Vss Core ground
VssQ Input/ Output ground
Read Operation
A read access requires two clock cycles to define the target half-page
address [CA37:CA16] and the burst type (linear burst hay wrapped burst).
The host then continues clocking for a number of Initial Latency cycles that
are installed in the Configuration Register
During the initial latency period the third clock cycle will specify the starting
address
Once these latency clocks have been completed the memory starts to
simultaneously transition the Read Write Data Strobe (RWDS) and begins
outputting the target data
7
Hot ng ghi
Write Operations
A write operation starts with the first three clock cycles providing the
CAx (Command / Address) information indicating the transaction
characteristics
Immediately following the CA information the host is able to transfer the
write data on the DQ bus
RWDS will be driven Low as long as CS# is Low
8
Program methods
Word Programming
Word programming is used to
program a single word or multi
word (maximum of 256 words)
The Word Programming command
sequence:
Address 555h, Data AAh: unlock
command 1
Address 2AAh, Data 55h: unlock
command 2
Address 555h, Data A0h: set up
command
Address : Program address, Data:
Program data
9
Write Buffer Programming
Write Buffer Programming
Write Buffer Programming allows up to 512 bytes to be programmed in one
operation
Sequence Address Data Comment
Issue Unlock Command 1 555 AA
Issue Unlock Command 2 2AA 55
Issue Write to Buffer Command SA 0025h
at Sector Address
Issue Number of Locations at SA WC WC = number of words to program minus 1
Sector Address
Example:
WC of 0 = 1 word to program
WC of 1 = 2 words to program
Load Starting Address/Data pair Staring PD Selects a Line and loads first Address/Data pair
address
Load next Address/Data pair WB PD All address must be within the select Line
boundaries and have to be loaded in sequential
Location
order
Load last Address/Data WB PD All address must be within the select Line
boundaries and have to be loaded in sequential
Location
order
Issue Write Buffer Program SA 0029h This command must follow the last write buffer
Confirm at Sector Address location loaded, or operation will Abort 10
Write Buffer Programming
Sequence will be Aborted
under the following conditions:
Load a Word Count value
greater than 255.
Write an address that is outside
the Line provided in the Write
to Buffer command.
The Program Buffer to Flash
command is not issued after
the Write Word Count number
of data words is loaded
11
Erase Methods
Chip Erase
The Chip Erase function erases the entire Flash Memory Array. After a
successful Chip Erase, all locations within the device contain FFFFh.
The Chip Erase command sequence
Sequence Address Data
Unlock Command 1 555h AAh
Unlock Command 2 2AAh 55h
Set up Command 555h 80h
Unlock Write Command 1 555h AAh
Unlock Write Command 2 2AAh 55h
Chip Erase Command 555h 10h
The system can determine the status of the erase operation by reading the
Status Register
12
Sector Erase
The Sector Erase function erases one sector in the memory array. After a
successful sector erase, all location within the erased sector contain FFFFh.
The system can determine the status of the erase operation by reading the
Status Register
13
Chng 4: Thit
4. RTL k RTL
Design
Funtional Block Diagram
14
Finite State Machine Diagram
READ
Wr && unlock 1
READUL1 Wr
Wr && unlock 2
Wr && CM_WB Wr && CM_LVCR Load
A WB READUL2
VCR
Wr && CM_PG Wr && CM_RVCR
Wr && CM_ER
Read Wr
ER
VCR
PG1
Wr && unlock 1
Wr
ERUL1
B Wr && unlock 2
PG
P_done ERUL2
Wr && CM_SER Wr && CM_CER
SER CER
E_done E_done
15
Finite State Machine Diagram
PGE
Sec_addr==sa_pgm && cnt>0
Sec_addr !=sa_pgm
WB load w_line !=wb_line Wr && unlock 1
next word
Sec_addr==sa_pgm &&
w_line==wb_line && cnt>0 PGEUL1 CM_SR_CLR
Sec_addr !=sa_pgm,
WB not CM_WB_ CF Wr && unlock 2
confirm
PGEUL2
READ
B PG
16
5.Writing testcases for verifying the function of the designed
HyperFlash Memory S26ks512s
Testplan
Testplan is an excutable document listing different scenarios to
demonstrate that the DUT will work according to specification
requirements and will not have any unexpected situations.
It is achieved by using the excel tool to fully enumerate the
scenarios that are executed, instructions for performing the test
process.
The Testplan is divided into 3 items: read operation, write operation,
and erase operation.
Each activity is divided into one or more covergroup. The
covergroup structure encapsulates the specification of a coverage
model.
Chng 2: Kim tra thit k bng cng c UVM
Setup testbench
Chng 5: Vit testcase kim tra chc nng thit k
FlashMemory S26KS512
Write testcase code
Based on the testplan, write testcases using the system verilog
language that checks for the three functions of the hyperflash: read,
write, and erase
Verify reading function
Through its characteristic features, burst type, clock latency, burst
lenghth.
Include testcases:
1. read_while_program_word.oo.sv
2. read_with_latency16.oo.sv
3. read_wrapped_burst_write_buffer.oo.sv
Simulation
Loaded by word programming
Addr: 170000h
Data :bd3b 35b8 6474 61b2 ..
Addr: 170000h
Data :bd3b 35 b8 6474 61b2 ..
All data read out is the same as the data loaded
21
Chng 5: Vit testcase kim tra chc nng thit k
FlashMemory S26KS512
24
Last addr = 1d400ff, data: d1bb
After Loading 256 words execute the confirm command with addr=
1d40000h
25
Chng 5: Vit testcase kim tra chc nng thit k
FlashMemory S26KS512
27
After sector erase command is complete , Reread the data and see
all positions in erased sector contains FFFFh
28
Chng 5: Vit testcase kim tra chc nng thit k
FlashMemory S26KS512
o Simulation
Compile any test file to check whether any error occurred with the
following command:
prj_setup.py --tst_name=
<testcase_name>usr_def_comp="+define+PURE_OO
+define+SPEEDSIM " --timescale=1ps/1ps --dump_vpd
At the end of each simulation, a TEST FAILED or TEST PASSED
report will be generated. Log files and Waveform viewers can help
debug further if the test fails.
View waveform with following command:
show_wf.sh scratch/s26ks512s/sim/<testcase_name>_RTL/
<testcase_name>.vpd views/s1.vpd.tcl &
Each waveform for each testcase will produce the same sequence
as the scenario given in the testplan
Chng 5: Vit testcase kim tra chc nng thit k
FlashMemory S26KS512
Evaluation criteria
Code coverage will be
a measure of the
performance of the
RTL performed by the
simulator while
running testcases
The evaluation criteria
used to test whether
the testbench has met
design requirements
Measure the
effectiveness of
performance verifying
design functions
Code coverage scoreboard
Chng 5: Vit testcase kim tra chc nng thit k
FlashMemory S26KS512
Comment :
Through the wave sequence shown on the waveform, the RTL
design is almost true for read, write and erase functions as required
by the spec.
The percentage of code coverage shows almost complete
inspection:
1. Coverage on each line of code
2. Coverage by block
3. Coverage under conditions, operations
4. Coverage by branch
5. Coverage according to the up, down (logical level 0/1) of the signal
6. Coverage of the finite state machine
Chng 5: Vit testcase kim tra chc nng thit k
Conclusions
FlashMemory S26KS512