decode.v

来自「可以对输入时钟任意分频(整数或小数),带Quartus II 完整项目文件.」· Verilog 代码 · 共 42 行

V
42
字号

/*
--------------------------------------------------------------------
File Name : decode.v
Programmer(s) : woailiushui qwb_ls@163.com
Commany : IOEMCT OF TJU
Created : 2006/05/09
Description :  The program for frequency divide, distribute the odde and fraction.
   vel : The input parameter of coefficient 
         High 8 bit is the integer, low 1 bit denote fraction
Modified History :
	Modified :
	Programmer :
	Description :
--------------------------------------------------------------------
*/
 
module decode
(
	clk, reset, vel, odde, fraction, clr, coef_i
);

	input clk;
	input reset;
	input [8:0] vel;
	output odde;
	output fraction;
	output clr;
	output [7:0] coef_i;

	//1 odd   0 even
	assign odde = (vel[1] == 1'b1)?1'b1:1'b0;   

    //1 fraction  0 no fraction
	assign fraction = (vel[0] == 1'b1)?1'b1:1'b0;   

	assign coef_i = vel[8:1];

	assign clr = (~reset)?1'b0:1'b1;

endmodule

⌨️ 快捷键说明

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