亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? can_testbench.v

?? 主要是說明can總線協(xié)議使用fpga的ip核實現(xiàn)
?? V
?? 第 1 頁 / 共 5 頁
字號:
//////////////////////////////////////////////////////////////////////////                                                              ////////  can_testbench.v                                             ////////                                                              ////////                                                              ////////  This file is part of the CAN Protocol Controller            ////////  http://www.opencores.org/projects/can/                      ////////                                                              ////////                                                              ////////  Author(s):                                                  ////////       Igor Mohor                                             ////////       igorm@opencores.org                                    ////////                                                              ////////                                                              ////////  All additional information is available in the README.txt   ////////  file.                                                       ////////                                                              //////////////////////////////////////////////////////////////////////////////                                                              //////// Copyright (C) 2002, 2003 Authors                             ////////                                                              //////// This source file may be used and distributed without         //////// restriction provided that this copyright statement is not    //////// removed from the file and that any derivative work contains  //////// the original copyright notice and the associated disclaimer. ////////                                                              //////// This source file is free software; you can redistribute it   //////// and/or modify it under the terms of the GNU Lesser General   //////// Public License as published by the Free Software Foundation; //////// either version 2.1 of the License, or (at your option) any   //////// later version.                                               ////////                                                              //////// This source is distributed in the hope that it will be       //////// useful, but WITHOUT ANY WARRANTY; without even the implied   //////// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //////// PURPOSE.  See the GNU Lesser General Public License for more //////// details.                                                     ////////                                                              //////// You should have received a copy of the GNU Lesser General    //////// Public License along with this source; if not, download it   //////// from http://www.opencores.org/lgpl.shtml                     ////////                                                              //////// The CAN protocol is developed by Robert Bosch GmbH and       //////// protected by patents. Anybody who wants to implement this    //////// CAN IP core on silicon has to obtain a CAN protocol license  //////// from Bosch.                                                  ////////                                                              ////////////////////////////////////////////////////////////////////////////// CVS Revision History//// $Log: can_testbench.v,v $// Revision 1.42  2006/04/25 13:17:59  igorm// New tests for testing the bus-off.//// Revision 1.41  2005/07/11 10:25:13  igorm// Fixing overrun problems.//// Revision 1.40  2004/03/18 17:39:17  igorm// I forgot to thange one signal name.//// Revision 1.39  2004/03/18 17:15:26  igorm// Signal bus_off_on added.//// Revision 1.38  2003/10/17 05:55:18  markom// mbist signals updated according to newest convention//// Revision 1.37  2003/09/30 20:53:58  mohor// Fixing the core to be Bosch VHDL Reference compatible.//// Revision 1.36  2003/08/20 10:03:20  mohor// Artisan RAMs added.//// Revision 1.35  2003/06/17 15:14:48  mohor// cs_can_i is used only when WISHBONE interface is not used.//// Revision 1.34  2003/03/26 11:25:39  mohor// CAN inturrupt is active low.//// Revision 1.33  2003/03/14 19:37:30  mohor// ALE changes on negedge of clk.//// Revision 1.32  2003/03/12 05:57:36  mohor// Bidirectional port_0_i changed to port_0_io.// input cs_can changed to cs_can_i.//// Revision 1.31  2003/03/12 04:40:00  mohor// rd_i and wr_i are active high signals. If 8051 is connected, these two signals// need to be negated one level higher.//// Revision 1.30  2003/03/12 04:16:40  mohor// 8051 interface added (besides WISHBONE interface). Selection is made in// can_defines.v file.//// Revision 1.29  2003/03/05 15:33:37  mohor// tx_o is now tristated signal. tx_oen and tx_o combined together.//// Revision 1.28  2003/03/05 15:00:49  mohor// Top level signal names changed.//// Revision 1.27  2003/03/01 22:48:26  mohor// Actel APA ram supported.//// Revision 1.26  2003/02/19 14:43:17  mohor// CAN core finished. Host interface added. Registers finished.// Synchronization to the wishbone finished.//// Revision 1.25  2003/02/18 00:19:39  mohor// Temporary backup version (still fully operable).//// Revision 1.24  2003/02/14 20:16:53  mohor// Several registers added. Not finished, yet.//// Revision 1.23  2003/02/12 14:28:30  mohor// Errors monitoring improved. arbitration_lost improved.//// Revision 1.22  2003/02/11 00:57:19  mohor// Wishbone interface added.//// Revision 1.21  2003/02/09 18:40:23  mohor// Overload fixed. Hard synchronization also enabled at the last bit of// interframe.//// Revision 1.20  2003/02/09 02:24:11  mohor// Bosch license warning added. Error counters finished. Overload frames// still need to be fixed.//// Revision 1.19  2003/02/04 17:24:33  mohor// Backup.//// Revision 1.18  2003/02/04 14:34:45  mohor// *** empty log message ***//// Revision 1.17  2003/01/31 01:13:31  mohor// backup.//// Revision 1.16  2003/01/16 13:36:14  mohor// Form error supported. When receiving messages, last bit of the end-of-frame// does not generate form error. Receiver goes to the idle mode one bit sooner.// (CAN specification ver 2.0, part B, page 57).//// Revision 1.15  2003/01/15 21:05:06  mohor// CRC checking fixed (when bitstuff occurs at the end of a CRC sequence).//// Revision 1.14  2003/01/15 14:40:16  mohor// RX state machine fixed to receive "remote request" frames correctly. No// data bytes are written to fifo when such frames are received.//// Revision 1.13  2003/01/15 13:16:42  mohor// When a frame with "remote request" is received, no data is stored to// fifo, just the frame information (identifier, ...). Data length that// is stored is the received data length and not the actual data length// that is stored to fifo.//// Revision 1.12  2003/01/14 17:25:03  mohor// Addresses corrected to decimal values (previously hex).//// Revision 1.11  2003/01/14 12:19:29  mohor// rx_fifo is now working.//// Revision 1.10  2003/01/10 17:51:28  mohor// Temporary version (backup).//// Revision 1.9  2003/01/09 21:54:39  mohor// rx fifo added. Not 100 % verified, yet.//// Revision 1.8  2003/01/08 02:09:43  mohor// Acceptance filter added.//// Revision 1.7  2002/12/28 04:13:53  mohor// Backup version.//// Revision 1.6  2002/12/27 00:12:48  mohor// Header changed, testbench improved to send a frame (crc still missing).//// Revision 1.5  2002/12/26 16:00:29  mohor// Testbench define file added. Clock divider register added.//// Revision 1.4  2002/12/26 01:33:01  mohor// Tripple sampling supported.//// Revision 1.3  2002/12/25 23:44:12  mohor// Commented lines removed.//// Revision 1.2  2002/12/25 14:16:54  mohor// Synchronization working.//// Revision 1.1.1.1  2002/12/20 16:39:21  mohor// Initial//////// synopsys translate_off`include "timescale.v"// synopsys translate_on`include "can_defines.v"`include "can_testbench_defines.v"module can_testbench();parameter Tp = 1;parameter BRP = 2*(`CAN_TIMING0_BRP + 1);`ifdef CAN_WISHBONE_IF  reg         wb_clk_i;  reg         wb_rst_i;  reg   [7:0] wb_dat_i;  wire  [7:0] wb_dat_o;  reg         wb_cyc_i;  reg         wb_stb_i;  reg         wb_we_i;  reg   [7:0] wb_adr_i;  wire        wb_ack_o;  reg         wb_free;`else  reg         rst_i;  reg         ale_i;  reg         rd_i;  reg         wr_i;  reg         ale2_i;  reg         rd2_i;  reg         wr2_i;  wire  [7:0] port_0;  wire  [7:0] port_0_i;  reg   [7:0] port_0_o;  reg         port_0_en;  reg         port_free;`endifreg         cs_can;reg         cs_can2;reg         clk;reg         rx;wire        tx;wire        tx_i;wire        bus_off_on;wire        irq;wire        clkout;wire        rx_and_tx;integer     start_tb;reg   [7:0] tmp_data;reg         delayed_tx;reg         tx_bypassed;reg         extended_mode;event       igor;// Instantiate can_top modulecan_top i_can_top( `ifdef CAN_WISHBONE_IF  .wb_clk_i(wb_clk_i),  .wb_rst_i(wb_rst_i),  .wb_dat_i(wb_dat_i),  .wb_dat_o(wb_dat_o),  .wb_cyc_i(wb_cyc_i),  .wb_stb_i(wb_stb_i),  .wb_we_i(wb_we_i),  .wb_adr_i(wb_adr_i),  .wb_ack_o(wb_ack_o),`else  .cs_can_i(cs_can),  .rst_i(rst_i),  .ale_i(ale_i),  .rd_i(rd_i),  .wr_i(wr_i),  .port_0_io(port_0),`endif  .clk_i(clk),  .rx_i(rx_and_tx),  .tx_o(tx_i),  .bus_off_on(bus_off_on),  .irq_on(irq),  .clkout_o(clkout)  // Bist`ifdef CAN_BIST  ,  // debug chain signals  .mbist_si_i(1'b0),       // bist scan serial in  .mbist_so_o(),           // bist scan serial out  .mbist_ctrl_i(3'b001)    // mbist scan {enable, clock, reset}`endif);// Instantiate can_top module 2can_top i_can_top2( `ifdef CAN_WISHBONE_IF  .wb_clk_i(wb_clk_i),  .wb_rst_i(wb_rst_i),  .wb_dat_i(wb_dat_i),  .wb_dat_o(wb_dat_o),  .wb_cyc_i(wb_cyc_i),  .wb_stb_i(wb_stb_i),  .wb_we_i(wb_we_i),  .wb_adr_i(wb_adr_i),  .wb_ack_o(wb_ack_o),`else  .cs_can_i(cs_can2),  .rst_i(rst_i),  .ale_i(ale2_i),  .rd_i(rd2_i),  .wr_i(wr2_i),  .port_0_io(port_0),`endif  .clk_i(clk),  .rx_i(rx_and_tx),  .tx_o(tx2_i),  .bus_off_on(bus_off2_on),  .irq_on(),  .clkout_o(clkout)  // Bist`ifdef CAN_BIST  ,  // debug chain signals  .mbist_si_i(1'b0),       // bist scan serial in  .mbist_so_o(),           // bist scan serial out  .mbist_ctrl_i(3'b001)    // mbist scan {enable, clock, reset}`endif);// Combining tx with the output enable signal.wire tx_tmp1;wire tx_tmp2;assign tx_tmp1 = bus_off_on?  tx_i  : 1'b1;assign tx_tmp2 = bus_off2_on? tx2_i : 1'b1;assign tx = tx_tmp1 & tx_tmp2;`ifdef CAN_WISHBONE_IF  // Generate wishbone clock signal 10 MHz  initial  begin    wb_clk_i=0;    forever #50 wb_clk_i = ~wb_clk_i;  end`endif`ifdef CAN_WISHBONE_IF`else  assign port_0_i = port_0;  assign port_0 = port_0_en? port_0_o : 8'hz;`endif// Generate clock signal 25 MHz// Generate clock signal 16 MHzinitialbegin  clk=0;  //forever #20 clk = ~clk;  forever #31.25 clk = ~clk;endinitialbegin  start_tb = 0;  cs_can = 0;  cs_can2 = 0;  rx = 1;  extended_mode = 0;  tx_bypassed = 0;  `ifdef CAN_WISHBONE_IF    wb_dat_i = 'hz;    wb_cyc_i = 0;    wb_stb_i = 0;    wb_we_i = 'hz;    wb_adr_i = 'hz;    wb_free = 1;    wb_rst_i = 1;    #200 wb_rst_i = 0;    #200 start_tb = 1;  `else    rst_i = 1'b0;    ale_i = 1'b0;    rd_i  = 1'b0;    wr_i  = 1'b0;    ale2_i = 1'b0;    rd2_i  = 1'b0;    wr2_i  = 1'b0;    port_0_o = 8'h0;    port_0_en = 0;    port_free = 1;    rst_i = 1;    #200 rst_i = 0;    #200 start_tb = 1;  `endifend// Generating delayed tx signal (CAN transciever delay)alwaysbegin  wait (tx);  repeat (2*BRP) @ (posedge clk);   // 4 time quants delay  #1 delayed_tx = tx;  wait (~tx);  repeat (2*BRP) @ (posedge clk);   // 4 time quants delay  #1 delayed_tx = tx;end//assign rx_and_tx = rx & delayed_tx;   FIX ME !!!assign rx_and_tx = rx & (delayed_tx | tx_bypassed);   // When this signal is on, tx is not looped back to the rx.// Main testbenchinitialbegin  wait(start_tb);  // Set bus timing register 0  write_register(8'd6, {`CAN_TIMING0_SJW, `CAN_TIMING0_BRP});  write_register2(8'd6, {`CAN_TIMING0_SJW, `CAN_TIMING0_BRP});  // Set bus timing register 1  write_register(8'd7, {`CAN_TIMING1_SAM, `CAN_TIMING1_TSEG2, `CAN_TIMING1_TSEG1});  write_register2(8'd7, {`CAN_TIMING1_SAM, `CAN_TIMING1_TSEG2, `CAN_TIMING1_TSEG1});  // Set Clock Divider register

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本色道久久综合亚洲精品按摩| 国产综合色精品一区二区三区| 91精品国产高清一区二区三区蜜臀 | 精品福利在线导航| 91麻豆国产福利在线观看| 精品午夜一区二区三区在线观看| 亚洲欧美二区三区| 中文字幕av一区二区三区高| 日韩欧美的一区二区| 91传媒视频在线播放| 成人国产精品免费观看| 国产精品自拍三区| 日韩国产欧美在线视频| 亚洲激情av在线| 国产精品久久久久影院亚瑟| 精品少妇一区二区三区在线视频 | 欧美精品久久一区二区三区| 91啪九色porn原创视频在线观看| 国产精品性做久久久久久| 日韩高清不卡一区二区三区| 亚洲午夜一二三区视频| 亚洲精品免费在线观看| 国产精品久久久久久户外露出 | 555www色欧美视频| 欧美日韩成人高清| 欧美日韩三级在线| 在线观看欧美日本| 欧美在线免费观看视频| 一本大道久久精品懂色aⅴ| 丰满白嫩尤物一区二区| 国产91丝袜在线播放九色| 国产黄色精品视频| 国产一区二区三区在线看麻豆| 国内精品免费**视频| 精品在线一区二区| 国产乱人伦偷精品视频免下载| 狠狠色丁香久久婷婷综合_中| 久久精品国产在热久久| 精品一区二区三区免费视频| 国产·精品毛片| 久久国产综合精品| 老司机免费视频一区二区三区| 日av在线不卡| 久久精品国产一区二区| 老汉av免费一区二区三区| 欧美日韩精品免费观看视频| 欧美怡红院视频| 欧美日韩亚洲国产综合| 欧美高清视频在线高清观看mv色露露十八| 欧美日韩夫妻久久| 日韩视频一区二区在线观看| 日韩女优毛片在线| 国产亚洲精久久久久久| 国产精品久久三区| 亚洲小说欧美激情另类| 午夜精彩视频在线观看不卡| 久久国产人妖系列| 国产成人在线观看| 91麻豆精品一区二区三区| 欧美三级三级三级| 精品国产一区二区国模嫣然| 国产片一区二区三区| 亚洲激情网站免费观看| 日本欧美加勒比视频| 国产成人精品1024| 在线看日韩精品电影| 日韩亚洲欧美在线| 中文一区二区完整视频在线观看| 夜夜嗨av一区二区三区| 另类专区欧美蜜桃臀第一页| 国产大片一区二区| 欧美日韩在线亚洲一区蜜芽| xf在线a精品一区二区视频网站| 欧美激情综合在线| 亚洲妇熟xx妇色黄| 欧美精品一区二| 综合久久一区二区三区| 丝瓜av网站精品一区二区| 黑人巨大精品欧美一区| 日本韩国欧美在线| 欧美成人综合网站| 一区二区三区四区蜜桃| 国产一区二区三区蝌蚪| 欧美三级在线视频| 国产精品女人毛片| 日韩av一区二区在线影视| 成a人片亚洲日本久久| 欧美精品久久一区| 综合欧美一区二区三区| 极品少妇xxxx精品少妇偷拍| 欧美视频一区在线| 亚洲国产精品二十页| 青草国产精品久久久久久| 99精品视频在线免费观看| 精品久久久久久亚洲综合网| 一二三四社区欧美黄| 国产不卡视频在线观看| 欧美精品 国产精品| 中文字幕在线不卡视频| 久久97超碰色| 欧美喷潮久久久xxxxx| 中文字幕亚洲在| 国产又粗又猛又爽又黄91精品| 欧美伊人久久久久久午夜久久久久| 欧美激情一区二区| 国产在线精品不卡| 制服丝袜亚洲色图| 亚洲福利视频一区| 91久久精品国产91性色tv| 国产精品美女久久久久久久久 | 国产麻豆欧美日韩一区| 在线电影国产精品| 亚洲综合免费观看高清在线观看| 国产欧美一二三区| 九九热在线视频观看这里只有精品| 欧美日韩中文另类| 亚洲一区国产视频| 日本韩国欧美三级| 亚洲精品视频在线| 91免费国产在线| 亚洲日本在线观看| 99久久婷婷国产综合精品| 欧美精品一区二区三区四区| 日本中文在线一区| 91精品国产乱码久久蜜臀| 亚洲国产视频网站| 欧美色综合网站| 亚洲成人免费在线观看| 欧美综合一区二区| 一区二区三区日韩精品视频| 色综合久久综合| 亚洲精品欧美激情| 欧美午夜一区二区| 丝袜美腿亚洲综合| 日韩美女在线视频| 韩国女主播成人在线观看| 欧美电影免费观看高清完整版在线| 免费成人结看片| 欧美成人r级一区二区三区| 久久国产日韩欧美精品| 久久影音资源网| 东方欧美亚洲色图在线| 中文字幕亚洲视频| 久久久夜色精品亚洲| 激情文学综合插| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲色欲色欲www| 日本伦理一区二区| 五月天激情综合| 欧美成人福利视频| 国产成a人亚洲精品| 亚洲视频狠狠干| 欧美日韩在线电影| 麻豆精品新av中文字幕| 久久久久国产免费免费| av在线免费不卡| 亚洲观看高清完整版在线观看| 欧美一级在线视频| 国产伦精品一区二区三区在线观看| 国产精品视频第一区| 欧洲一区二区三区在线| 日韩电影免费在线| 久久久久久久网| 日本高清不卡一区| 精品在线免费视频| 国产精品久久久久精k8| 欧美日韩高清一区二区| 国产一区在线看| 亚洲激情网站免费观看| 欧美电视剧免费观看| 丁香婷婷综合五月| 天天操天天综合网| 国产欧美一区二区精品仙草咪| 欧美中文字幕一区| 精品无人区卡一卡二卡三乱码免费卡| 国产精品午夜久久| 91精品国产综合久久福利| 成人午夜免费av| 男女视频一区二区| 9色porny自拍视频一区二区| 亚洲无人区一区| 国产农村妇女精品| 欧美日韩亚洲不卡| k8久久久一区二区三区| 免费欧美高清视频| 亚洲老妇xxxxxx| 久久精品亚洲乱码伦伦中文| 欧美亚洲高清一区二区三区不卡| 国产综合色在线| 午夜精品久久久久| 亚洲三级理论片| 国产亚洲美州欧州综合国| 宅男噜噜噜66一区二区66| 99国产精品一区| 精彩视频一区二区三区| 亚洲制服丝袜av| 一区精品在线播放| 久久久精品蜜桃| 日韩一区二区免费高清| 欧美在线观看18|