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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? test.v

?? 8位RISC CPU的VERILOG編程 SOURCECODE
?? V
?? 第 1 頁 / 共 2 頁
字號:
/* ***********************************************************************  The Free IP Project  Free-RISC8 -- Verilog 8-bit Microcontroller  (c) 1999, The Free IP Project and Thomas Coonan  FREE IP GENERAL PUBLIC LICENSE  TERMS AND CONDITIONS FOR USE, COPYING, DISTRIBUTION, AND MODIFICATION  1.  You may copy and distribute verbatim copies of this core, as long      as this file, and the other associated files, remain intact and      unmodified.  Modifications are outlined below.    2.  You may use this core in any way, be it academic, commercial, or      military.  Modified or not.    3.  Distribution of this core must be free of charge.  Charging is      allowed only for value added services.  Value added services      would include copying fees, modifications, customizations, and      inclusion in other products.  4.  If a modified source code is distributed, the original unmodified      source code must also be included (or a link to the Free IP web      site).  In the modified source code there must be clear      identification of the modified version.  5.  Visit the Free IP web site for additional information.      http://www.free-ip.com*********************************************************************** */`timescale 1ns / 10psmodule test;// For 50Mhz, period is 20ns, so set CLKHI to 10 and CLKLO to 10parameter CLKHI = 10;parameter CLKLO = 10;// Define some codes for each instruction opcode.  These have nothing to do// with the actual encoding of the instructions.  This is for display purposes.//parameter NOP	= 1;parameter MOVWF	= 2;parameter CLRW	= 3;parameter CLRF	= 4;parameter SUBWF	= 5;parameter DECF	= 6;parameter IORWF	= 7;parameter ANDWF	= 8;parameter XORWF	= 9;parameter ADDWF	= 10;parameter MOVF	= 11;parameter COMF	= 12;parameter INCF	= 13;parameter DECFSZ = 14;parameter RRF	= 15;parameter RLF	= 16;parameter SWAPF	= 17;parameter INCFSZ = 18;parameter BCF	= 19;parameter BSF	= 20;parameter BTFSC	= 21;parameter BTFSS	= 22;parameter OPTION = 23;parameter SLEEP	= 24;parameter CLRWDT = 25;parameter TRIS	= 26;parameter RETLW	= 27;parameter CALL	= 28;parameter GOTO	= 29;parameter MOVLW	= 30;parameter IORLW	= 31;parameter ANDLW	= 32;parameter XORLW	= 33;// *** Basic Interface to the PICCPUreg		clk;reg		reset;// Declare I/O Port connectionsreg  [7:0]	porta; // INPUTwire [7:0]	portb; // OUTPUTwire [7:0]	portc; // OUTPUT// Declare ROM and rom signalswire [10:0]	pramaddr;wire [11:0]	pramdata;// *** Expansion Interfacewire [7:0]	expdin;wire [7:0]	expdout;wire [6:0]	expaddr;wire		expread;wire		expwrite;// Debug output ports on the core.  These are just internal signals brought out so// they can be observed.//wire [7:0]	debugw;wire [10:0]	debugpc;wire [11:0]	debuginst;wire [7:0]	debugstatus; // Instantiate one CPU to be tested.cpu cpu (   .clk		(clk),   .reset	(reset),   .paddr	(pramaddr),   .pdata	(pramdata),   .portain	(porta),   .portbout	(portb),   .portcout	(portc),   .expdin	(expdin),   .expdout	(expdout),   .expaddr	(expaddr),   .expread	(expread),   .expwrite	(expwrite),   .debugw	(debugw),   .debugpc	(debugpc),   .debuginst	(debuginst),   .debugstatus	(debugstatus));// Instantiate the Program RAM.pram pram (   .clk		(clk),   .address	(pramaddr),   .we		(1'b0),			// This testbench doesn't allow writing to PRAM   .din		(12'b000000000000),	// This testbench doesn't allow writing to PRAM   .dout	(pramdata));// Output of the DDS in the Expansion module (see section on the DDS Demo in docs).wire [7:0] dds_out;// Instantiate one PICEXP (Expansion) module.  This one is a DDS circuit.exp exp(   .clk		(clk),   .reset	(reset),   .expdin	(expdin),   .expdout	(expdout),   .expaddr	(expaddr),   .expread	(expread),   .expwrite	(expwrite),   .dds_out	(dds_out));// This is the only initial block in the test module and this is where// you select what test you want to do.//initial begin   $display ("Free-RISC8.  Version 1.0");      // Just uncomment out the test you want to run!      // ** This is our top-level "Basic Confidence" test.   basic;      // ** This is the DDS example.  Make sure the DDS circuit is in the Verilog command line.   //dds_test;end// Event should be emitted by any task to kill simulation.  Tasks should// use this to close files, etc.//event ENDSIM;// Capture some datatask capture_data;   begin      $dumpfile ("risc8.vcd");      $dumpvars (0, test);      @(ENDSIM);      $dumpflush;   endendtask// Resettask reset_pic;   begin      reset = 1;      #200;      reset = 0;      $display ("End RESET.");   endendtask  // Drive the clock inputtask drive_clock;   begin      clk  = 0;      forever begin         #(CLKLO) clk = 1;         #(CLKHI) clk = 0;      end   endendtask// *************  BASIC CONFIDENCE Test Tasks **************//// BASIC CONFIDENCE Test.//// This task will fork off all the other necessary tasks to cause reset, drive the clock, etc. etc.//// task basic;      integer  num_outputs;   integer  num_matches;   integer  num_mismatches;      begin      $display ("Free-RISC8 1.0.  This is the BASIC CONFIDENCE TEST.");      #1;         $display ("Loading program memory with %s", "basic.rom");      $readmemh ("basic.rom", pram.mem);      fork         // Capture data         capture_data;                  // Run the clock         drive_clock;                  // Do a reset         reset_pic;                  // Monitor the number of cycles and set an absolute maximum number of cycles.         monitor_cycles (5000);                  // More specific monitors         //monitor_inst;         monitor_portb;         monitor_portc;                  // Drive PORTA with a toggling pattern.  This is for one of the subtests.         //         basic_drive_porta;                  // Monitor the counting pattern on PORTB.  This is our self-checking scheme for the test.         //          begin            //             num_outputs = 9;  // Expect exactly 7 changes on the PORTB (0..6).                        // Call the following task which will watch PORTB for the patterns.            //            basic_monitor_output_signature (num_outputs, num_matches, num_mismatches);                        // See how we did!            repeat (2) @(posedge clk);            $display ("Done monitoring for output signature.  %0d Matches, %0d Mismatches.", num_matches, num_mismatches);            if (num_matches == num_outputs && num_mismatches == 0) begin               $display ("SUCCESS.");            end            else begin               $display ("Test FAILED!!");            end                        // We are done.  Throw the ENDSIM event.            ->ENDSIM;            #0;            $finish;         end                  // Catch end of simulation event due to max number of cycles or pattern from PIC code.         begin            @(ENDSIM);  // Catch the event.                        // Got it!            $display ("End of simulation signalled.  Killing simulation in a moment.");            #0; // Let anything else see this event...            $finish;         end      join   endendtask// Monitor PORTB for an incrementing pattern.  This is how we are doing our self-checking.// A good run will count from ZERO up to some number.//task basic_monitor_output_signature;   input   num_outputs;   output  num_matches;   output  num_mismatches;      integer  num_outputs;   integer  num_matches;   integer  num_mismatches;      integer      i;   reg [7:0]    expected_output;   begin      num_matches    = 0;      num_mismatches = 0;            expected_output = 8'h00;            i = 0;      while (i < num_outputs) begin         // Wait for any change on output port B.         @(portb);         #1;  // Wait for a moment for any wiggling on different               // bits to seetle out, just in case there's any gate-level going on..         if (portb == expected_output) begin            $display ("MONITOR_OUTPUT_SIGNATURE: Expected output observed on PORTB: %h", portb);            num_matches = num_matches + 1;         end         else begin            $display ("MONITOR_OUTPUT_SIGNATURE: Unexpected output on PORTB: %h", portb);            num_mismatches = num_mismatches + 1;         end                     expected_output = expected_output + 1;         i = i + 1;      end   endendtasktask basic_drive_porta;   begin      forever begin         porta = 8'h55;         repeat (32) @(posedge clk);         porta = 8'hAA;         repeat (32) @(posedge clk);      end   endendtask// *************  DDS Demo Test Tasks **************//// DDS Test.//// This task will fork off all the other necessary tasks to cause reset, drive the clock, etc. etc.//// In a waveform viewer, check out PORTC[1:0] and also check out the 'dds_out' output.// You should see a modulated sine wave (e.g. FSK).

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区在线免费观看| 91精品福利在线一区二区三区| 91亚洲资源网| 免费xxxx性欧美18vr| 亚洲黄色尤物视频| 国产精品婷婷午夜在线观看| 日韩视频免费观看高清在线视频| 欧美在线999| 91网站在线播放| 精品成a人在线观看| 日韩欧美在线一区二区三区| 亚洲精品视频在线观看网站| 欧美浪妇xxxx高跟鞋交| 在线影视一区二区三区| 欧美视频日韩视频| 777午夜精品免费视频| 欧美一区二区在线看| 一区二区三区精品久久久| 亚洲午夜久久久久久久久电影网| 亚洲蜜臀av乱码久久精品| 一区二区三区精品在线| 99r精品视频| 欧美日韩精品一区二区在线播放 | 精品无人区卡一卡二卡三乱码免费卡 | 色欧美日韩亚洲| 色88888久久久久久影院按摩 | 亚洲激情男女视频| 精品日韩一区二区三区免费视频| 欧美一区二区三区系列电影| 一区二区在线免费观看| av亚洲精华国产精华| 91浏览器打开| 最近中文字幕一区二区三区| 亚洲国产日日夜夜| 在线一区二区三区做爰视频网站| 中文字幕在线不卡一区二区三区| 午夜精品久久久久久久99水蜜桃 | 91精品国产综合久久香蕉麻豆| 亚洲精品国产精华液| 日本高清无吗v一区| 亚洲精品视频在线观看网站| 日本黄色一区二区| 亚洲午夜私人影院| 欧美日韩国产精品自在自线| 丝袜美腿亚洲综合| 成人av在线观| 日韩一区二区在线观看视频 | 亚洲视频一区二区在线观看| 99久久伊人网影院| 亚洲精品久久7777| 欧美嫩在线观看| 国模娜娜一区二区三区| 色美美综合视频| 亚洲一区在线免费观看| 成人午夜看片网址| 欧美一级二级在线观看| 精品一区二区综合| 国产精品久久久久久久久晋中 | 精品国产成人在线影院| 国产精品亚洲一区二区三区妖精 | 久久综合五月天婷婷伊人| 亚洲精选在线视频| 欧美电影在线免费观看| 国产一区二区三区电影在线观看| 欧美日韩视频专区在线播放| 国产精品久久综合| 欧美日韩一区二区在线视频| 久热成人在线视频| 欧美久久久久久蜜桃| 国内精品久久久久影院一蜜桃| 中文字幕av免费专区久久| 久久精品99国产国产精| 国产精品久久久久久久久免费丝袜| 91福利国产成人精品照片| 韩国在线一区二区| 伊人婷婷欧美激情| 精品999在线播放| 色婷婷国产精品| 国产在线精品一区二区三区不卡| 亚洲人成7777| 久久综合久久99| 欧美日韩综合一区| 国产成人福利片| 久久婷婷国产综合精品青草| 色综合久久久久综合| 精品在线亚洲视频| 亚洲国产婷婷综合在线精品| 欧美国产精品一区二区| 91麻豆精品国产无毒不卡在线观看| 成人av在线资源| 黄页网站大全一区二区| 午夜视频在线观看一区| 国产精品国产三级国产aⅴ无密码| 日韩一级二级三级| 91国产免费看| av午夜精品一区二区三区| 国产在线麻豆精品观看| 青青草伊人久久| 亚洲一区日韩精品中文字幕| 成人免费一区二区三区在线观看| 精品福利av导航| 日韩一区二区在线免费观看| 欧美日韩中文精品| 91免费观看视频在线| 粉嫩嫩av羞羞动漫久久久| 一区二区三区av电影| 国产精品久久久久久久裸模| 久久精品视频网| 成熟亚洲日本毛茸茸凸凹| 韩国中文字幕2020精品| 久久国产精品一区二区| 日韩精品久久久久久| 亚洲国产wwwccc36天堂| 亚洲永久免费视频| 亚洲天堂成人在线观看| 中文字幕在线免费不卡| 亚洲欧洲av在线| 中文字幕日本乱码精品影院| 国产精品久久久久久久久久免费看| 国产日韩影视精品| 欧美日韩在线电影| 欧美吻胸吃奶大尺度电影| 欧美视频中文一区二区三区在线观看| 欧美性一级生活| 欧美理论在线播放| 日韩欧美一区二区视频| 一本到三区不卡视频| 日本精品一级二级| 欧美男人的天堂一二区| 欧美一区二区三区视频| 精品久久免费看| 国产视频视频一区| 国产精品久久久久9999吃药| 亚洲天堂中文字幕| 亚洲一区欧美一区| 日韩成人免费在线| 国产日韩av一区| 亚洲人成网站色在线观看| 亚洲一区二区美女| 美腿丝袜在线亚洲一区| 亚洲国产精品天堂| 麻豆久久一区二区| av不卡免费在线观看| 欧美亚洲动漫精品| 欧美电影精品一区二区| 久久精品亚洲麻豆av一区二区 | 国产日产欧美一区二区视频| 国产精品初高中害羞小美女文| 亚洲综合久久av| 九色|91porny| 94-欧美-setu| 欧美日韩国产a| 久久婷婷色综合| 亚洲一区二区三区视频在线播放 | 午夜精品久久久久久久蜜桃app | 久久蜜臀中文字幕| 欧美一级艳片视频免费观看| 国产精品天天看| 亚洲成人自拍偷拍| 亚洲高清免费在线| 国产成人自拍网| 欧美人妇做爰xxxⅹ性高电影| 久久品道一品道久久精品| 一区二区三区中文在线| 久久成人久久爱| 99久久久久久| 欧美精品一区二区三区四区| 亚洲精品国久久99热| 国产精品1区二区.| 欧美日韩一卡二卡三卡| 国产精品污网站| 久久成人免费电影| 精品视频在线免费看| 国产精品午夜电影| 久久国产精品区| 欧美一区二区在线免费播放| 一区二区三区资源| 国产成人aaa| 欧美成人一区二区三区在线观看| 自拍av一区二区三区| 国产乱码精品一区二区三| 91麻豆精品国产自产在线观看一区| 亚洲欧美在线另类| 狠狠色丁香久久婷婷综合_中| 欧美亚洲国产一区二区三区va| 亚洲国产精品激情在线观看| 国产一区二区在线观看免费| 91精品国产aⅴ一区二区| 亚洲精品免费播放| av激情亚洲男人天堂| 久久先锋影音av鲁色资源| 免费国产亚洲视频| 337p亚洲精品色噜噜| 亚洲国产欧美在线| 在线精品视频免费观看| 亚洲精品乱码久久久久久黑人| 99在线精品观看| 日韩美女视频19| 色一区在线观看| 亚洲同性同志一二三专区|