tbs_dec.v
来自「another 8051 core porocesssor vhdl sourc」· Verilog 代码 · 共 124 行
V
124 行
//******************************************************************* ////IMPORTANT NOTICE ////================ ////Copyright Mentor Graphics Corporation 1996 - 1999. All rights reserved. ////This file and associated deliverables are the trade secrets, ////confidential information and copyrighted works of Mentor Graphics ////Corporation and its licensors and are subject to your license agreement ////with Mentor Graphics Corporation. //// ////Use of these deliverables for the purpose of making silicon from an IC ////design is limited to the terms and conditions of your license agreement ////with Mentor Graphics If you have further questions please contact Mentor ////Graphics Customer Support. //// ////This Mentor Graphics core (m8051 v1999.120) was extracted on ////workstation hostid _hostid_ Inventra ////////////////////////////////////////////////////////////////////////////// tbs_dec.vhd - miscellaneous test bench task defintions// V2.000 29.iv.97 RPD self-checking functions removed//// Verilog file generated by X-HDL - Revision 2.2 Beta D May 8, 1996// Fri May 31 09:40:36 BST 1996// // Input file : /user/ken/rtl/m8052/vhdl/sim/tbs_dec.vhd// Design name : // Architecture : rtl// Author : // Company : // // Description :// ////////////////////////////////////////////////////////////////////////parameter high = 1'b1;parameter low = 1'b0;`define maxbirlinelength 25`define maxbirlines 55000////////////////////////////////////////////////////////////////////////function [3:0] bit_val; input c;begin bit_val = c;endendfunction//////////////////////////////////////////////////////////////////////////////////////////////function int_val; input c;begin int_val = c;endendfunction//////////////////////////////////////////////////////////////////////////////////////////////function extract_hex_dataint; input [2:1] l; reg int_data;begin extract_hex_dataint = int_val(l[1]) * 16 + int_val(l[2]);endendfunction//////////////////////////////////////////////////////////////////////////////////////////////function extract_hex_databyte; input [2:1] l; reg [7:0] data_byte;begin data_byte[7:4] = bit_val(l[1]); data_byte[3:0] = bit_val(l[2]); extract_hex_databyte = data_byte;endendfunction//////////////////////////////////////////////////////////////////////////////////////////////function convert_to_int; input value;begin convert_to_int = value;endendfunction////////////////////////////////////////////////////////////////////////task birtitle_out;begin $fdisplay(resultsbir," P P P P N "); $fdisplay(resultsbir," O O O O X P"); $fdisplay(resultsbir," R R R R R N T A S"); $fdisplay(resultsbir," T T T T S E L L E"); $fdisplay(resultsbir," 0 1 2 3 T A 1 E N");endendtask////////////////////////////////////////////////////////////////////////task unititle_out;begin$fdisplay(resultsuni," N N");$fdisplay(resultsuni," N N N S S");$fdisplay(resultsuni," A P E A P A X I N N N N F F");$fdisplay(resultsuni,"N N N R L S S L S L O D M M D F F R R");$fdisplay(resultsuni,"E X X S E E A B C D M F F O O O O A B C D E E E F L O W L F F O W O W");$fdisplay(resultsuni,"A 1 2 T I I I I I I D I R A B C D E E E E O N N F E M E E M A O E E E E");endendtask ////////////////////////////////////////////////////////////////////////task birdata_out;begin $fstrobeh(resultsbir, " ", P0, " ", P1, " ", P2, " ", P3, " ", RST, " ", NEA, " ", NXTAL1, " ", ALE, " ", NPSEN, " %0.0f", $realtime, " ns");endendtask////////////////////////////////////////////////////////////////////////task unidata_out;begin $fstrobeh(resultsuni, NEA, " ", NX1, " ", NX2, " ", RST, " ", ALEI, " ", PSEI, " ", AI, " ", BI, " ", CI, " ", DI, " ", MD, " ", FI, " ", NESFR, " ", OA, " ", OB, " ", OC, " ", OD, " ", AE, " ", BE, " ", CE, " ", DE, " ", ALEO, " ", NPSEN, " ", NALEN, " ", XOFF, " ", IDLE, " ", M, " ", NMOE, " ", NMWE, " ", DLM, " ", FA, " ", FO, " ", NFOE, " ", NFWE, " ", NSFROE, " ", NSFRWE, " ", "%0.0f", $realtime, " ns");endendtask////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?