ahb_wb_master.sv

来自「opencore ahb to wishbone bus verilog cod」· SV 代码 · 共 55 行

SV
55
字号
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*****************************************************************************************************************// Copyright (c) 2007 TooMuch Semiconductor Solutions Pvt Ltd.////File name		:	ahb_wb_master.sv	//Designer		: 	Sanjay kumar	//Date			: 	3rd Aug'2007		//Description		: 	stimulus_gen:This module perform reset and initial signal setup for the testbench.	//Revision		:	1.0//*****************************************************************************************************************///////////////////////////////////////////////////////////////////////////////////////////////////////////////////import global::*;`timescale 1 ns/1 psmodule stimulus_gen( ahb_wb_if.master_ab m_ab,                     input bit clk,                     input bit reset);//****************************************** // assign input clk and reset to stimulus gen//******************************************  assign m_ab.hclk = clk;  assign m_ab.hresetn = reset;always@(posedge m_ab.hclk)   	if (!m_ab.hresetn)		begin		m_ab.htrans='b00;		m_ab.haddr='bx;		m_ab.hwdata='bx;		end			//******************************************// initial signal setups//******************************************task initial_setup;      	begin        @(posedge m_ab.hclk);     #2 m_ab.hsel   ='b1;    // slave selected (only one)        m_ab.hburst ='b000;  // single transfer         m_ab.hsize  ='b010;  // 32 bit size bursting        m_ab.hwrite ='b0;        m_ab.htrans ='b10;	endendtask		                            endmodule    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?