?? updcnt6.v
字號:
`timescale 1ns/1ns
`define updcnt6
/************************************************************************
** File : updcnt6.v
** Design Date: June 9, 1998
** Creation Date: Thu Sep 21 17:00:30 2000
** Created By SpDE Version: SpDE 8.2
** Author: Brian Faith, QuickLogic Corporation,
** Copyright (C) 1998, Customers of QuickLogic may copy and modify this
** file for use in designing QuickLogic devices only.
** Description: This is the counter for generating the read
** and write addresses in the FIFOs.
************************************************************************/
module updcnt6 (up, down, clk, q, rst);
// inputs: up,down,clk,rst
// outputs: =q[5:0]=
input up, down, clk, rst;
output [5:0] q;
reg [5:0] q;
always @(posedge clk or posedge rst) begin
if (rst)
q <= #1 0;
else
case ({up, down})
2'b00 : q <= #1 q;
2'b01 : q <= #1 q - 1;
2'b10 : q <= #1 q + 1;
2'b11 : q <= #1 q;
endcase
end
endmodule
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -