⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simcon.v

📁 arm10_verilog.rar是基于arm10的verilog代码
💻 V
字号:
/*-----------------------------------------------------------------------------Module:		simconAuthor:		Scott VenierFilename:	simcon.vDescription:	simulator interface to the behavioral model of the ARM10		(arm10.v)-----------------------------------------------------------------------------*/`define SAVE_INTERVAL	 10000000module simcon();integer		instruction_count;integer		instr_limit;integer		next_checkpoint;integer		timer;integer		timeout;reg		save_enable;task processargs;begin	/* make a trn file for signalscan */	if($test$plusargs("trn"))	begin		$recordfile("arm.trn");		$recordvars;	end	/* if this is a restart then append to dump file */	if($test$plusargs("restart"))	begin		$reopen("arm_reg.dump");		$init_sim(".rsim",instr_limit,next_checkpoint,timeout);	end	if($test$plusargs("verify"))	begin		$init_verify();	end	/* enable save capability */	if($test$plusargs("save")) save_enable = 1;	else save_enable = 0;endendtaskinitialbegin	instruction_count=0;	timer=0;	next_checkpoint=1;	$init_sim(".isim",instr_limit,next_checkpoint,timeout);	processargs;        $init_state(".istate","arm_reg.dump");endalways #`SAVE_INTERVALbegin	if(save_enable)	begin		$system("/bin/mv -f save save.1");		$save("save");	/*	#0 processargs */	endend//always @(test_arm.nRESET)//begin//	$init_state(".istate","arm_reg.dump");//endalways @(instruction_count or next_checkpoint or timer or timeout)begin	if(instruction_count==next_checkpoint || instruction_count>=instr_limit ||	    timer>=timeout)		$check_state(instruction_count,next_checkpoint,instr_limit,timer,		    timeout);endalways @(test_arm.GCLK)begin	if(test_arm.GCLK==1)	begin		timer=timer+1;		instruction_count=instruction_count+1;	endendendmodule /* simcon */

⌨️ 快捷键说明

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