📄 t160b3b.v
字号:
/*
INTEL DEVELOPER'S SOFTWARE LICENSE AGREEMENT
BY USING THIS SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF
THIS AGREEMENT. DO NOT USE THE SOFTWARE UNTIL YOU HAVE CAREFULLY READ
AND AGREED TO THE FOLLOWING TERMS AND CONDITIONS. IF YOU DO NOT AGREE
TO THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN THE SOFTWARE PACKAGE AND
ANY ACCOMPANYING ITEMS.
IF YOU USE THIS SOFTWARE, YOU WILL BE BOUND BY THE TERMS OF THIS
AGREEMENT
LICENSE: Intel Corporation ("Intel") grants you the non-exclusive right
to use the enclosed software program ("Software"). You will not use,
copy, modify, rent, sell or transfer the Software or any portion
thereof, except as provided in this Agreement.
System OEM Developers may:
1. Copy the Software for support, backup or archival purposes;
2. Install, use, or distribute Intel owned Software in object code
only;
3. Modify and/or use Software source code that Intel directly makes
available to you as an OEM Developer;
4. Install, use, modify, distribute, and/or make or have made
derivatives ("Derivatives") of Intel owned Software under the
terms and conditions in this Agreement, ONLY if you are a System
OEM Developer and NOT an end-user.
RESTRICTIONS:
YOU WILL NOT:
1. Copy the Software, in whole or in part, except as provided for
in this Agreement;
2. Decompile or reverse engineer any Software provided in object
code format;
3. Distribute any Software or Derivative code to any end-users,
unless approved by Intel in a prior writing.
TRANSFER: You may transfer the Software to another OEM Developer if the
receiving party agrees to the terms of this Agreement at the sole risk
of any receiving party.
OWNERSHIP AND COPYRIGHT OF SOFTWARE: Title to the Software and all
copies thereof remain with Intel or its vendors. The Software is
copyrighted and is protected by United States and international
copyright laws. You will not remove the copyright notice from the
Software. You agree to prevent any unauthorized copying of the
Software.
DERIVATIVE WORK: OEM Developers that make or have made Derivatives will
not be required to provide Intel with a copy of the source or object
code. OEM Developers shall be authorized to use, market, sell, and/or
distribute Derivatives to other OEM Developers at their own risk and
expense. Title to Derivatives and all copies thereof shall be in the
particular OEM Developer creating the Derivative. Such OEMs shall
remove the Intel copyright notice from all Derivatives if such notice is
contained in the Software source code.
DUAL MEDIA SOFTWARE: If the Software package contains multiple media,
you may only use the medium appropriate for your system.
WARRANTY: Intel warrants that it has the right to license you to use,
modify, or distribute the Software as provided in this Agreement. The
Software is provided "AS IS". Intel makes no representations to
upgrade, maintain, or support the Software at any time. Intel warrants
that the media on which the Software is furnished will be free from
defects in material and workmanship for a period of one (1) year from
the date of purchase. Upon return of such defective media, Intel's
entire liability and your exclusive remedy shall be the replacement of
the Software.
THE ABOVE WARRANTIES ARE THE ONLY WARRANTIES OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
PARTICULAR PURPOSE.
LIMITATION OF LIABILITY: NEITHER INTEL NOR ITS VENDORS OR AGENTS SHALL
BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA,
INTERRUPTION OF BUSINESS, NOR FOR INDIRECT, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER THIS AGREEMENT OR
OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
TERMINATION OF THIS LICENSE: Intel reserves the right to conduct or have
conducted audits to verify your compliance with this Agreement. Intel
may terminate this Agreement at any time if you are in breach of any of
its terms and conditions. Upon termination, you will immediately
destroy, and certify in writing the destruction of, the Software or
return all copies of the Software and documentation to Intel.
U.S. GOVERNMENT RESTRICTED RIGHTS: The Software and documentation were
developed at private expense and are provided with "RESTRICTED RIGHTS".
Use, duplication or disclosure by the Government is subject to
restrictions as set forth in FAR52.227-14 and DFAR252.227-7013 et seq.
or its successor.
EXPORT LAWS: You agree that the distribution and export/re-export of the
Software is in compliance with the laws, regulations, orders or other
restrictions of the U.S. Export Administration Regulations.
APPLICABLE LAW: This Agreement is governed by the laws of the State of
California and the United States, including patent and copyright laws.
Any claim arising out of this Agreement will be brought in Santa Clara
County, California.
*/
`timescale 1ns/1ns
module test28F160B3B();
reg [`AddrSize-1:0] address;
reg [31:0] vcc,
vpp;
reg ceb,
oeb,
web,
wpb,
rpb;
reg [`MaxOutputs-1:0] dq_reg;
wire [`MaxOutputs-1:0] dq = dq_reg;
IntelAdvBoot IFlash (dq, address, ceb, oeb, web, rpb, wpb, vpp, vcc);
initial
begin
// $dumpfile("f160b3b.dmp");
// $dumpoff;
// $dumpvars(???,dq,address,ceb,oeb,web,rpb,wpb);
dq_reg = `MaxOutputs'hz;
powerup;
ReadID;
//Verify READS with loose timing (OE Toggling)
#200
SetReadMode;
#200
$display("READ DATA, Loose Timing, toggle OE");
#200
ReadData(`AddrSize'h0);
#200
ReadData(`AddrSize'h01000);
#200
ReadData(`AddrSize'h02000);
#200
ReadData(`AddrSize'h03000);
#200
ReadData(`AddrSize'h04000);
#200
ReadData(`AddrSize'hE8000);
#200
ReadData(`AddrSize'hF0000);
#200
ReadData(`AddrSize'hF8000);
$display("READ DATA, Loose Timing, toggle Addr");
//Verify Reads (OE LOW)
#200
address = `AddrSize'h00F00;
#200
address = `AddrSize'h01F00;
#200
address = `AddrSize'h02F00;
#200
address = `AddrSize'h03FFF;
#200
address = `AddrSize'h04FFF;
#200
address = `AddrSize'hEFFFF;
#200
address = `AddrSize'hF4000;
#200
address = `AddrSize'hFFFFF;
#200
oeb = `VIH;
$display("PROGRAM DATA, Loose Timing, Boot Locked");
#200
ProgramData(`AddrSize'h00000, `MaxOutputs'h0000); //LockBlock
#200
ProgramData(`AddrSize'h01000, `MaxOutputs'h0001); //LockBlock
#200
ProgramData(`AddrSize'h02000, `MaxOutputs'h0002);
#200
ProgramData(`AddrSize'h03000, `MaxOutputs'h0003);
#200
ProgramData(`AddrSize'h04000, `MaxOutputs'h0004);
#200
ProgramData(`AddrSize'hE8000, `MaxOutputs'h0036);
#200
ProgramData(`AddrSize'hF0000, `MaxOutputs'h0037);
#200
ProgramData(`AddrSize'hF8000, `MaxOutputs'h0038);
#200
ProgramData(`AddrSize'h00F00, `MaxOutputs'h0005); //LockBlock
#200
ProgramData(`AddrSize'h01F00, `MaxOutputs'h0006); //LockBlock
#200
ProgramData(`AddrSize'h02F00, `MaxOutputs'h0007);
#200
ProgramData(`AddrSize'h03FFF, `MaxOutputs'h0008);
#200
ProgramData2(`AddrSize'h04FFF, `MaxOutputs'h0009);
#200
ProgramData2(`AddrSize'hEFFFF, `MaxOutputs'h000A);
#200
ProgramData2(`AddrSize'hF4000, `MaxOutputs'h000B);
#200
ProgramData2(`AddrSize'hFFFFF, `MaxOutputs'h000C);
$display("READ DATA, Loose Timing, toggle OE");
#200
SetReadMode;
#200
ReadData(`AddrSize'h0);
#200
ReadData(`AddrSize'h01000);
#200
ReadData(`AddrSize'h02000);
#200
ReadData(`AddrSize'h03000);
#200
ReadData(`AddrSize'h04000);
#200
ReadData(`AddrSize'hE8000);
#200
ReadData(`AddrSize'hF0000);
#200
ReadData(`AddrSize'hF8000);
$display("READ DATA, Loose Timing, toggle Addr");
//Verify Reads (OE LOW)
#200
address = `AddrSize'h00F00;
#200
address = `AddrSize'h01F00;
#200
address = `AddrSize'h02F00;
#200
address = `AddrSize'h03FFF;
#200
address = `AddrSize'h04FFF;
#200
address = `AddrSize'hEFFFF;
#200
address = `AddrSize'hF4000;
#200
address = `AddrSize'hFFFFF;
#200
oeb = `VIH;
$display("Unlock BOOT (WP#)");
#200
wpb = `VIH; //UNLOCK
$display("PROGRAM DATA, Boot Unlocked");
#200
ProgramData(`AddrSize'h00000, `MaxOutputs'h005A);
#200
ProgramData(`AddrSize'h01000, `MaxOutputs'h0001);
#200
ProgramData(`AddrSize'h00F00, `MaxOutputs'h0005);
#200
ProgramData(`AddrSize'h01F00, `MaxOutputs'h0006);
$display("READ DATA, Loose Timing, Toggle OE");
#200
SetReadMode;
#200
ReadData(`AddrSize'h00000);
#200
address = `AddrSize'h01000;
#200
address = `AddrSize'h00F00;
#200
address = `AddrSize'h01F00;
#200
oeb = `VIH;
$display("WRITE SUSPEND TEST");
begin: WriteSuspend
#200
StartProgram(`AddrSize'h05000, `MaxOutputs'h5000);
#200
oeb = `VIH;
#200
oeb = `VIL;
#200
oeb = `VIH;
#(((`AC_ProgramTime_Word_27_12/2)*`TimerPeriod_)-1000)
Suspend;
#200
SetReadMode;
#200
ReadData(`AddrSize'h04FFF);
#200
ReadData(`AddrSize'hFFFFF);
#200
ReadData(`AddrSize'h05000);
#200
oeb = `VIH;
#200
StartProgram(`AddrSize'hA0000, `MaxOutputs'hAAAA);
#300
Resume;
#200
oeb = `VIL;
#(((`AC_ProgramTime_Word_27_12/2)*`TimerPeriod_)-1000)
begin: Poll
forever
begin
oeb = `VIH;
#500
oeb = `VIL;
#500
if (dq[7] == `VIH)
disable Poll;
end
end
#300
SetReadMode;
#200
ReadData(`AddrSize'h05001);
#200
ReadData(`AddrSize'h05000);
#200
ReadData(`AddrSize'hA0000);
#200
oeb = `VIH;
end //WriteSuspend
$display("ERASE Block");
#200
EraseBlock(`AddrSize'h04F00);
$display("READ DATA, Loose Timing");
#300
SetReadMode;
#200
ReadData(`AddrSize'h04000);
#200
address = `AddrSize'h03FFF;
#200
address = `AddrSize'h04FFF;
#200
oeb = `VIH;
$display("ERASE Locked Block");
#200
wpb = `VIL;
#500
EraseBlock(`AddrSize'h01F00);
#200
wpb = `VIH;
$display("READ DATA, Loose Timing");
#300
SetReadMode;
#200
ReadData(`AddrSize'h01000);
#200
address = `AddrSize'h01F00;
#200
oeb = `VIH;
//Bad Erase Confirm
$display("BAD Erase confirm test");
begin: BadErase
#200
address = `AddrSize'hEA000;
#200
dq_reg = `EraseBlockCmd;
#200
web = `VIL;
#200
web = `VIH;
#200
dq_reg = `ReadArrayCmd;
#200
web = `VIL;
#200
web = `VIH;
#200
dq_reg = `MaxOutputs'hz;
#200
oeb = `VIL;
#1000
begin: Poll
forever
begin
oeb = `VIH;
#1000
oeb = `VIL;
#1000
if (dq[7] == `VIH)
disable Poll;
end //forever
end //Poll
end // BadErase
#500
ReadCSRMode;
#500
ClearCSRMode;
#500
ReadCSRMode;
#500
SetReadMode;
#200
ReadData(`AddrSize'hE8000);
#200
oeb = `VIH;
$display("Erase Suspend test");
begin: EraseSuspendTest
#200
StartErase(`AddrSize'hEA000);
#1000
oeb = `VIH;
#200
oeb = `VIL;
#200
oeb = `VIH;
#(((`AC_EraseTime_Main_27_12/2)*`TimerPeriod_)-1000)
Suspend;
#200
ReadCSRMode;
#200
SetReadMode;
#200
ReadData(`AddrSize'h00000);
#200
ReadData(`AddrSize'h02000);
#200
ReadData(`AddrSize'hEFFFF);
#200
oeb = `VIH;
#200
ProgramData(`AddrSize'h50000, `MaxOutputs'h0055);
#1000
Resume;
#200
oeb = `VIL;
#(((`AC_EraseTime_Main_27_12/2)*`TimerPeriod_)-1000)
begin: Poll
forever
begin
oeb = `VIH;
#500
oeb = `VIL;
#500
if (dq[7] == `VIH)
disable Poll;
end
end
#300
SetReadMode;
#200
ReadData(`AddrSize'hE8000);
#200
address = `AddrSize'h50000;
#200
address = `AddrSize'hEFFFF;
#200
oeb = `VIH;
end // EraseSuspendTest
#500
$display("Embedded Suspend Mode");
begin: EraseSuspend_
#100
StartErase(`AddrSize'hF5000);
#1000
oeb = `VIH;
#200
oeb = `VIL;
#200
oeb = `VIH;
#(((`AC_EraseTime_Main_27_12/2)*`TimerPeriod_)-1000)
Suspend;
#200
SetReadMode;
#200
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -