?? rom_1024x8.v
字號:
/*-----------------------------------------------------------------------------
-- ROM inference using Synplify --
-- (BlockRAM ROM example) --
-------------------------------------------------------------------------------
--
-- GENERAL:
-- Synplify infers ROM when all assignment values are constants in a
-- "case" or "if...else" statement
--
-- Virtex-II ROM resources:
-- - Logic
-- - Distributed ROM (Primitives: ROM16X1, ROM32X1, ROM64X1, ROM128X1,
-- ROM256X1)
-- - BlockRAM (Primitives: RAMB16...)
-- Different ROMs:
-- - asynchronous (Mapped to: Logic or Distributed ROM)
-- - synchronous (Mapped to: Logic, Distribute ROM or BlockRAM)
-- - Clock enable
-- - Reset (output buffer)
-- - Dual port (BlockRAM only - instanciation only)
--
-- NOTES:
-- - Mapping ROM into Distributed ROM (Synplify default)
-- - At least half the available addresses must be assigned a value
-- - Mapping ROM to BlockRAM will be available in Synplify 7.1
-- - either addresses or outputs of the ROM should be registered
-- - memory block should be more than 256 different addresses
-- Log file message:
-- - Synplicity Xilinx Technology Mapper section
-- @N|Packed ROM romsig[7:0] (10 input, 8 output) to Block SelectRAM
-- Resource Usage Report section (RAM/ROM usage summary)
-- RAMB16_S18 1 use
-------------------------------------------------------------------------------
-- Example: Synchronous 1024X8 ROM mapped to BlockRAM
-----------------------------------------------------------------------------*/
module romtest (clk, addr, data);
input clk;
input [9:0] addr;
output [7:0] data;
reg [7:0] data;
reg [7:0] romsig /* synthesis syn_romstyle = "block_ram" */ ;
// value: "select_rom" forces Distributed ROM implementation (default)
// value: "logic" forces Logic ROM implementation
// value: "block_ram" forces BlockRAM ROM implementation (available in version 7.1)
always @(addr)
begin
case ( addr )
10'h000: romsig = 8'h00;
10'h001: romsig = 8'h01;
10'h002: romsig = 8'h05;
10'h003: romsig = 8'h0d;
10'h004: romsig = 8'h1b;
10'h005: romsig = 8'h32;
10'h006: romsig = 8'h4f;
10'h007: romsig = 8'h6f;
10'h008: romsig = 8'h8f;
10'h009: romsig = 8'haf;
10'h00a: romsig = 8'hcf;
10'h00b: romsig = 8'hee;
10'h00c: romsig = 8'he5;
10'h00d: romsig = 8'he5;
10'h00e: romsig = 8'he5;
10'h00f: romsig = 8'h01;
10'h010: romsig = 8'h02;
10'h011: romsig = 8'h00;
10'h012: romsig = 8'h06;
10'h013: romsig = 8'h0e;
10'h014: romsig = 8'h1c;
10'h015: romsig = 8'h33;
10'h016: romsig = 8'h50;
10'h017: romsig = 8'h70;
10'h018: romsig = 8'h90;
10'h019: romsig = 8'hb0;
10'h01a: romsig = 8'hd0;
10'h01b: romsig = 8'hee;
10'h01c: romsig = 8'he6;
10'h01d: romsig = 8'he6;
10'h01e: romsig = 8'h02;
10'h01f: romsig = 8'h03;
10'h020: romsig = 8'h01;
10'h021: romsig = 8'h07;
10'h022: romsig = 8'h0f;
10'h023: romsig = 8'h1d;
10'h024: romsig = 8'h34;
10'h025: romsig = 8'h51;
10'h026: romsig = 8'h71;
10'h027: romsig = 8'h91;
10'h028: romsig = 8'hb1;
10'h029: romsig = 8'hd1;
10'h02a: romsig = 8'hef;
10'h02b: romsig = 8'he7;
10'h02c: romsig = 8'he7;
10'h02d: romsig = 8'h03;
10'h02e: romsig = 8'h04;
10'h02f: romsig = 8'h02;
10'h030: romsig = 8'h08;
10'h031: romsig = 8'h10;
10'h032: romsig = 8'h1e;
10'h033: romsig = 8'h35;
10'h034: romsig = 8'h52;
10'h035: romsig = 8'h72;
10'h036: romsig = 8'h92;
10'h037: romsig = 8'hb2;
10'h038: romsig = 8'hd2;
10'h039: romsig = 8'hf0;
10'h03a: romsig = 8'he8;
10'h03b: romsig = 8'he8;
10'h03c: romsig = 8'h04;
10'h03d: romsig = 8'h05;
10'h03e: romsig = 8'h03;
10'h03f: romsig = 8'h09;
10'h040: romsig = 8'h01;
10'h041: romsig = 8'h11;
10'h042: romsig = 8'h1f;
10'h043: romsig = 8'h36;
10'h044: romsig = 8'h53;
10'h045: romsig = 8'h73;
10'h046: romsig = 8'h93;
10'h047: romsig = 8'hb3;
10'h048: romsig = 8'hd3;
10'h049: romsig = 8'hf0;
10'h04a: romsig = 8'he9;
10'h04b: romsig = 8'h05;
10'h04c: romsig = 8'h06;
10'h04d: romsig = 8'h04;
10'h04e: romsig = 8'h0a;
10'h04f: romsig = 8'h01;
10'h050: romsig = 8'h12;
10'h051: romsig = 8'h20;
10'h052: romsig = 8'h37;
10'h053: romsig = 8'h54;
10'h054: romsig = 8'h74;
10'h055: romsig = 8'h94;
10'h056: romsig = 8'hb4;
10'h057: romsig = 8'hd4;
10'h058: romsig = 8'hf1;
10'h059: romsig = 8'hea;
10'h05a: romsig = 8'h06;
10'h05b: romsig = 8'h07;
10'h05c: romsig = 8'h05;
10'h05d: romsig = 8'h0b;
10'h05e: romsig = 8'h02;
10'h05f: romsig = 8'h13;
10'h060: romsig = 8'h21;
10'h061: romsig = 8'h38;
10'h062: romsig = 8'h55;
10'h063: romsig = 8'h75;
10'h064: romsig = 8'h95;
10'h065: romsig = 8'hb5;
10'h066: romsig = 8'hd5;
10'h067: romsig = 8'hf2;
10'h068: romsig = 8'heb;
10'h069: romsig = 8'h07;
10'h06a: romsig = 8'h08;
10'h06b: romsig = 8'h06;
10'h06c: romsig = 8'h0c;
10'h06d: romsig = 8'h03;
10'h06e: romsig = 8'h14;
10'h06f: romsig = 8'h22;
10'h070: romsig = 8'h39;
10'h071: romsig = 8'h56;
10'h072: romsig = 8'h76;
10'h073: romsig = 8'h96;
10'h074: romsig = 8'hb6;
10'h075: romsig = 8'hd6;
10'h076: romsig = 8'hf2;
10'h077: romsig = 8'hec;
10'h078: romsig = 8'h08;
10'h079: romsig = 8'h09;
10'h07a: romsig = 8'h07;
10'h07b: romsig = 8'h0d;
10'h07c: romsig = 8'h03;
10'h07d: romsig = 8'h15;
10'h07e: romsig = 8'h23;
10'h07f: romsig = 8'h3a;
10'h080: romsig = 8'h57;
10'h081: romsig = 8'h77;
10'h082: romsig = 8'h97;
10'h083: romsig = 8'hb7;
10'h084: romsig = 8'hd7;
10'h085: romsig = 8'hf3;
10'h086: romsig = 8'hed;
10'h087: romsig = 8'h09;
10'h088: romsig = 8'h0a;
10'h089: romsig = 8'h08;
10'h08a: romsig = 8'h0e;
10'h08b: romsig = 8'h04;
10'h08c: romsig = 8'h16;
10'h08d: romsig = 8'h24;
10'h08e: romsig = 8'h3b;
10'h08f: romsig = 8'h58;
10'h090: romsig = 8'h78;
10'h091: romsig = 8'h98;
10'h092: romsig = 8'hb8;
10'h093: romsig = 8'hd8;
10'h094: romsig = 8'hf4;
10'h095: romsig = 8'hee;
10'h096: romsig = 8'h0a;
10'h097: romsig = 8'h0b;
10'h098: romsig = 8'h09;
10'h099: romsig = 8'h0f;
10'h09a: romsig = 8'h05;
10'h09b: romsig = 8'h17;
10'h09c: romsig = 8'h25;
10'h09d: romsig = 8'h3c;
10'h09e: romsig = 8'h59;
10'h09f: romsig = 8'h79;
10'h0a0: romsig = 8'h99;
10'h0a1: romsig = 8'hb9;
10'h0a2: romsig = 8'hd9;
10'h0a3: romsig = 8'hf4;
10'h0a4: romsig = 8'hef;
10'h0a5: romsig = 8'h0b;
10'h0a6: romsig = 8'h0c;
10'h0a7: romsig = 8'h0a;
10'h0a8: romsig = 8'h10;
10'h0a9: romsig = 8'h05;
10'h0aa: romsig = 8'h18;
10'h0ab: romsig = 8'h26;
10'h0ac: romsig = 8'h3d;
10'h0ad: romsig = 8'h5a;
10'h0ae: romsig = 8'h7a;
10'h0af: romsig = 8'h9a;
10'h0b0: romsig = 8'hba;
10'h0b1: romsig = 8'hda;
10'h0b2: romsig = 8'hf5;
10'h0b3: romsig = 8'hf0;
10'h0b4: romsig = 8'h0c;
10'h0b5: romsig = 8'h0d;
10'h0b6: romsig = 8'h0b;
10'h0b7: romsig = 8'h11;
10'h0b8: romsig = 8'h07;
10'h0b9: romsig = 8'h19;
10'h0ba: romsig = 8'h02;
10'h0bb: romsig = 8'h27;
10'h0bc: romsig = 8'h3e;
10'h0bd: romsig = 8'h5b;
10'h0be: romsig = 8'h7b;
10'h0bf: romsig = 8'h9b;
10'h0c0: romsig = 8'hbb;
10'h0c1: romsig = 8'he0;
10'h0c2: romsig = 8'hd1;
10'h0c3: romsig = 8'h0d;
10'h0c4: romsig = 8'h0e;
10'h0c5: romsig = 8'h0c;
10'h0c6: romsig = 8'h12;
10'h0c7: romsig = 8'h08;
10'h0c8: romsig = 8'h1a;
10'h0c9: romsig = 8'h03;
10'h0ca: romsig = 8'h28;
10'h0cb: romsig = 8'h3f;
10'h0cc: romsig = 8'h5c;
10'h0cd: romsig = 8'h7c;
10'h0ce: romsig = 8'h9c;
10'h0cf: romsig = 8'hbc;
10'h0d0: romsig = 8'he1;
10'h0d1: romsig = 8'hd2;
10'h0d2: romsig = 8'h0e;
10'h0d3: romsig = 8'h0f;
10'h0d4: romsig = 8'h0d;
10'h0d5: romsig = 8'h13;
10'h0d6: romsig = 8'h09;
10'h0d7: romsig = 8'h1b;
10'h0d8: romsig = 8'h03;
10'h0d9: romsig = 8'h29;
10'h0da: romsig = 8'h40;
10'h0db: romsig = 8'h5d;
10'h0dc: romsig = 8'h7d;
10'h0dd: romsig = 8'h9d;
10'h0de: romsig = 8'hbd;
10'h0df: romsig = 8'he2;
10'h0e0: romsig = 8'hd3;
10'h0e1: romsig = 8'h0f;
10'h0e2: romsig = 8'h10;
10'h0e3: romsig = 8'h0e;
10'h0e4: romsig = 8'h14;
10'h0e5: romsig = 8'h0a;
10'h0e6: romsig = 8'h1c;
10'h0e7: romsig = 8'h04;
10'h0e8: romsig = 8'h2a;
10'h0e9: romsig = 8'h41;
10'h0ea: romsig = 8'h5e;
10'h0eb: romsig = 8'h7e;
10'h0ec: romsig = 8'h9e;
10'h0ed: romsig = 8'hbe;
10'h0ee: romsig = 8'he2;
10'h0ef: romsig = 8'hd4;
10'h0f0: romsig = 8'h10;
10'h0f1: romsig = 8'h11;
10'h0f2: romsig = 8'h0f;
10'h0f3: romsig = 8'h15;
10'h0f4: romsig = 8'h0b;
10'h0f5: romsig = 8'h1d;
10'h0f6: romsig = 8'h05;
10'h0f7: romsig = 8'h2b;
10'h0f8: romsig = 8'h42;
10'h0f9: romsig = 8'h5f;
10'h0fa: romsig = 8'h7f;
10'h0fb: romsig = 8'h9f;
10'h0fc: romsig = 8'hbf;
10'h0fd: romsig = 8'he3;
10'h0fe: romsig = 8'hd5;
10'h0ff: romsig = 8'h11;
10'h100: romsig = 8'h12;
10'h101: romsig = 8'h10;
10'h102: romsig = 8'h16;
10'h103: romsig = 8'h0c;
10'h104: romsig = 8'h1e;
10'h105: romsig = 8'h05;
10'h106: romsig = 8'h2c;
10'h107: romsig = 8'h43;
10'h108: romsig = 8'h60;
10'h109: romsig = 8'h80;
10'h10a: romsig = 8'ha0;
10'h10b: romsig = 8'hc0;
10'h10c: romsig = 8'he4;
10'h10d: romsig = 8'hd6;
10'h10e: romsig = 8'h12;
10'h10f: romsig = 8'h13;
10'h110: romsig = 8'h11;
10'h111: romsig = 8'h17;
10'h112: romsig = 8'h0d;
10'h113: romsig = 8'h1f;
10'h114: romsig = 8'h06;
10'h115: romsig = 8'h2d;
10'h116: romsig = 8'h44;
10'h117: romsig = 8'h61;
10'h118: romsig = 8'h81;
10'h119: romsig = 8'ha1;
10'h11a: romsig = 8'hc1;
10'h11b: romsig = 8'he4;
10'h11c: romsig = 8'hd7;
10'h11d: romsig = 8'h13;
10'h11e: romsig = 8'h14;
10'h11f: romsig = 8'h12;
10'h120: romsig = 8'h18;
10'h121: romsig = 8'h0e;
10'h122: romsig = 8'h20;
10'h123: romsig = 8'h07;
10'h124: romsig = 8'h2e;
10'h125: romsig = 8'h45;
10'h126: romsig = 8'h62;
10'h127: romsig = 8'h82;
10'h128: romsig = 8'ha2;
10'h129: romsig = 8'hc2;
10'h12a: romsig = 8'he5;
10'h12b: romsig = 8'hd8;
10'h12c: romsig = 8'h14;
10'h12d: romsig = 8'h15;
10'h12e: romsig = 8'h13;
10'h12f: romsig = 8'h19;
10'h130: romsig = 8'h0f;
10'h131: romsig = 8'h21;
10'h132: romsig = 8'h07;
10'h133: romsig = 8'h2f;
10'h134: romsig = 8'h46;
10'h135: romsig = 8'h63;
10'h136: romsig = 8'h83;
10'h137: romsig = 8'ha3;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -