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

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

?? can_testbench.v

?? 主要是說明can總線協議使用fpga的ip核實現
?? 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一区二区三区免费野_久草精品视频
色天天综合久久久久综合片| 久久一区二区视频| 欧美国产精品劲爆| 国产成人综合在线| 日韩欧美成人一区二区| 蜜臀久久久99精品久久久久久| 7777女厕盗摄久久久| 日日夜夜免费精品| 亚洲精品国产精华液| 99综合电影在线视频| 一区二区三区在线免费播放| 欧美日韩中文一区| 香蕉久久夜色精品国产使用方法| 在线综合+亚洲+欧美中文字幕| 丁香一区二区三区| 一区二区三区国产精华| 久久精品亚洲乱码伦伦中文| va亚洲va日韩不卡在线观看| 久久激情综合网| 国产精品人成在线观看免费| 欧美在线你懂的| 麻豆精品视频在线观看免费| 亚洲自拍与偷拍| 宅男噜噜噜66一区二区66| 91女厕偷拍女厕偷拍高清| 天堂久久一区二区三区| 一区精品在线播放| 69p69国产精品| 在线免费一区三区| 99精品久久久久久| 免费在线观看日韩欧美| 国产精品欧美极品| 亚洲精品在线免费观看视频| 99久久精品99国产精品| 国产成人精品免费视频网站| 老司机精品视频线观看86 | 亚洲成人精品一区二区| 18成人在线观看| 日韩一区在线看| 国产精品美日韩| 欧美国产日韩精品免费观看| 国产精品亲子伦对白| 国产精品视频一区二区三区不卡| 久久久精品天堂| 91麻豆精品国产91久久久久久久久| 欧美亚洲综合另类| 国产成人精品免费网站| 国产东北露脸精品视频| 国产成人免费在线观看不卡| 国产成人免费在线观看不卡| 国产99久久久精品| 粉嫩高潮美女一区二区三区| a亚洲天堂av| 91蜜桃免费观看视频| 91国产视频在线观看| 国产一区 二区 三区一级| 亚洲国产精品欧美一二99| 国产日韩欧美a| 欧美一区二区黄| 欧美亚洲综合网| 欧美一区二区视频免费观看| 精品国产一区二区三区四区四| 26uuu色噜噜精品一区二区| 久久精品视频网| 亚洲日本免费电影| 国产精品久久久久久久第一福利| 精品免费视频.| 91精品国产麻豆国产自产在线| 欧美一区二区三区思思人| 欧美α欧美αv大片| 亚洲国产高清不卡| 亚洲制服欧美中文字幕中文字幕| 丝袜美腿亚洲综合| 国产在线视频不卡二| 麻豆91在线播放| 成人午夜看片网址| 国产精品99久久久久久宅男| 久久 天天综合| 经典三级一区二区| 99综合电影在线视频| 欧美精品精品一区| 欧美视频一区在线观看| 精品1区2区在线观看| 一区二区三区精品在线| 捆绑调教美女网站视频一区| av一二三不卡影片| 欧美电影一区二区| 国产精品入口麻豆原神| 爽好多水快深点欧美视频| 国产精品一区二区视频| 在线观看日韩高清av| 久久久精品日韩欧美| 亚洲大片一区二区三区| 国产91精品在线观看| 精品视频一区三区九区| 中文字幕av资源一区| 天堂在线亚洲视频| 成人av资源在线观看| 91在线无精精品入口| 日韩一区二区在线观看| 精品成人一区二区三区| 亚洲精品乱码久久久久久黑人| 久久精品国产久精国产| 色欲综合视频天天天| 精品国产乱子伦一区| 午夜伦理一区二区| 国产精品亚洲专一区二区三区| 欧美日韩中文字幕一区| 综合色天天鬼久久鬼色| 激情伊人五月天久久综合| 欧美影院午夜播放| 成人免费一区二区三区视频| 国产专区欧美精品| 日韩免费性生活视频播放| 一区二区三区美女视频| 大陆成人av片| 久久欧美一区二区| 久久精品99久久久| 欧美一区二区精品| 婷婷夜色潮精品综合在线| 色婷婷av一区二区三区软件 | 亚洲电影视频在线| 91丝袜国产在线播放| 欧美激情一区二区三区全黄| 国产在线精品一区二区| 欧美xxxxx牲另类人与| 亚洲第一成年网| 欧美日韩国产综合久久| 国产日产欧产精品推荐色 | 国产一区二区三区观看| 日韩欧美一级二级三级久久久| 天天综合日日夜夜精品| 在线亚洲一区二区| 亚洲欧美激情视频在线观看一区二区三区 | 国产精品中文欧美| 午夜视频一区在线观看| 亚洲综合丁香婷婷六月香| 国产美女主播视频一区| 日韩女优毛片在线| 老司机精品视频在线| 日韩精品一区二区三区老鸭窝| 日韩精品欧美成人高清一区二区| 欧美网站大全在线观看| 亚洲午夜久久久久久久久电影院| 欧美亚一区二区| 亚洲自拍偷拍网站| 欧美日韩中字一区| 午夜国产精品影院在线观看| 欧美日韩国产精品成人| 日韩成人dvd| 国产麻豆精品在线观看| 亚洲精品在线观看网站| 国产电影一区二区三区| 欧美激情艳妇裸体舞| 99久久精品99国产精品| 一区二区三区在线观看网站| 色婷婷综合五月| 亚洲成人免费在线观看| 欧美久久久影院| 久久成人免费日本黄色| 久久久九九九九| 色网站国产精品| 日韩精品一卡二卡三卡四卡无卡| 91精品国产综合久久小美女| 国产一区二区三区高清播放| 国产精品久久久久久久久免费丝袜 | 欧美日精品一区视频| 日本成人在线一区| 久久久电影一区二区三区| 99综合影院在线| 视频一区在线视频| 精品久久久久久久久久久久久久久久久| 青青草成人在线观看| 国产欧美综合色| 欧美亚洲免费在线一区| 丝袜美腿一区二区三区| 久久久久久久综合日本| 色爱区综合激月婷婷| 久久精品国产亚洲aⅴ| 国产精品视频yy9299一区| 欧美在线不卡一区| 经典三级一区二区| 亚洲女人的天堂| 欧美成人一区二区| www..com久久爱| 久草这里只有精品视频| 中文字幕日韩av资源站| 制服丝袜亚洲网站| 国产91精品一区二区麻豆网站| 一区二区三区欧美久久| 日韩精品专区在线影院重磅| 99国产精品国产精品毛片| 蜜臀国产一区二区三区在线播放| 国产精品蜜臀在线观看| 欧美一区二区成人| 色欲综合视频天天天| 国产一区二区三区在线观看免费 | 91亚洲精品一区二区乱码| 美女视频免费一区| 亚洲美女屁股眼交|