当前位置:网站首页>Verilog 每日一题(VL2 异步复位的串联T触发器--牛客网)
Verilog 每日一题(VL2 异步复位的串联T触发器--牛客网)
2022-07-28 16:23:00 【别再出error了】
题目:实现两个串联异步复位的T触发器,具体结构及波形图如下:

这一题比较简单,只要知道了T触发器的特性就比较好解答了。即:输入为1时值翻转(0变成1\1变成0),输入为0时不变。
两个串联设置成两个always块就可以,代码如下
`timescale 1ns/1ns
module Tff_2 (
input wire data, clk, rst,
output reg q
);
//*************code***********//
reg data1;
always @(posedge clk,negedge rst)begin
if(!rst) data1<=0;
else if(data) data1<=~data1;
else data1<=data1;
end
always @(posedge clk,negedge rst)begin
if(!rst) q<=0;
else if(data1) q<=~q;
else q<=q;
end
//*************code***********//
endmodule顺便复习一下T触发器细节上的结构及特性:
逻辑功能:控制信号T=1时,翻转;T=0时,保持。特性表及特性方程如下:
特性表

特性方程:

而它的逻辑符号图形如下:

事实上,JK触发器的两个输入端连在一起作为T端就可以构成T触发器。

边栏推荐
- Iris framework practice of goweb development: project summary and review
- How to use fail2ban to protect WordPress login page
- The actual combat of the beego framework of goweb development: Section III program execution process analysis
- Unity shader realizes mirror effect with rendered texture
- 线性代数及矩阵论(十)
- Realize the reset function of steering wheel UI with touch rotation and finger departure in unity
- Re11: read EPM legal judgment prediction via event extraction with constraints
- C # traversal set
- Unity3d simple implementation of water surface shader
- WPF command button transparent style
猜你喜欢

Visual Studio 2012/2015发布Web应用连同.cs源码一起发布

Verilog 每日一题 (VL30 RAM的简单实现)

Easypoi --- excel file export

Comprehensively design an oppe homepage -- after sales service of the page

Shopee code League 2022 - qualification round p3.connecting the numbers (segment tree / bipartite graph determination, to be discussed)

线性代数及矩阵论(九)

Analysis of browser decoding process

Games101-assignment05 ray tracing - rays intersect triangles

: No such file or directory

Goweb开发之Beego框架实战:第二节 项目初始化配置
随机推荐
The longest substring of sword finger offer without repeated characters
MySQL installation tutorial
Unity3d simple implementation of water surface shader
The 16th program design competition of Dalian University of Technology (Problem Solver)
浏览器解码过程分析
异步FIFO基本原理(基于Verilog的简单实现)
2022 Niuke multi school second CDE
Code implementation additive attention
Some notes on how unity objects move
C#遍历集合
Algorithm learning: leetcode interview question 09. implement queue with two stacks
Problem solution of code heartstrings Junior Group (official competition) of Dalian University of Technology (Development Zone campus) in 2021
Proof of the third scene (f) in 22 years
Message Passing for Complex Question Answering over Knowledge Graphs
Codeforces Round #750 (Div. 2) F.Korney Korneevich and XOR (easy&&hard version)(dp)
Goweb开发之Beego框架实战:第五节 项目搭建及注册用户
The 2021 ICPC ASIA Taipei Regional programming contest L. leadfoot (combinatorics /2-adic assignment function +kummer theorem)
Codeforces round 770 (Div. 2) e. fair share
C # traversal set
线性代数及矩阵论(九)