当前位置:网站首页>(4)UART应用设计及仿真验证2 —— TX模块设计(无状态机)
(4)UART应用设计及仿真验证2 —— TX模块设计(无状态机)
2022-07-05 22:54:00 【少卿不在大理寺】
前言:再次回顾这个小项目已是几个月后了,在后续的学习中,新的老师在不断强调,实际工作中尽量少用状态机,整理文章时忘了当时他咋说的了。所以我试着自己重新写一下UART,整理一个不带状态机的版本。
这里有几个基础的逻辑点要再次回顾一下:
1)完整的一帧数据格式包含:起始位,有效数据位,校验位,停止位;
2)计算单bit数据的传输时间:利用baoud(波特率)和clk(系统时钟),波特率单位bit per second,时钟Hz单位time per second ,所以时钟除以波特率得到的就是time per bit,即每bit对应多少个时钟周期;
3)参考信号:传输信号baoud_cnt_half,每bit计数到一半的时候,传递数据;切换计数信号baoud_cnt_end,每bit计数完的时候,进入下一轮计数周期;位计数bit_cnt,计算一帧数据中传递到第几位了;传输过程标志信号start_flag,贯穿每一次的数据传输。
上代码:
//date:2022.6.30
//edgar.yao
//uart_tx block
module uart_tx(
input clk,
input rst_n,
input[7:0] cmd_data,
input data_valid,
output tx,
output tx_read边栏推荐
- Metasploit (MSF) uses MS17_ 010 (eternal blue) encoding:: undefined conversionerror problem
- Leetcode weekly The 280 game of the week is still difficult for the special game of the week's beauty team ~ simple simulation + hash parity count + sorting simulation traversal
- 3:第一章:认识JVM规范2:JVM规范,简介;
- Multi view 3D reconstruction
- Global and Chinese markets of industrial pH meters 2022-2028: Research Report on technology, participants, trends, market size and share
- 基于脉冲神经网络的物体检测
- 第十七周作业
- 2022 R2 mobile pressure vessel filling review simulation examination and R2 mobile pressure vessel filling examination questions
- 秒杀系统的设计与实现思路
- Yiwen gets rid of the garbage collector
猜你喜欢

Selenium+Pytest自动化测试框架实战

Non rigid / flexible point cloud ICP registration

Overview of Fourier analysis

Data type, variable declaration, global variable and i/o mapping of PLC programming basis (CoDeSys)

Ieventsystemhandler event interface
![[digital signal denoising] improved wavelet modulus maxima digital signal denoising based on MATLAB [including Matlab source code 1710]](/img/b4/af689abb3ad4e25988f2d17152406e.jpg)
[digital signal denoising] improved wavelet modulus maxima digital signal denoising based on MATLAB [including Matlab source code 1710]

Tensor attribute statistics

3:第一章:认识JVM规范2:JVM规范,简介;

Registration and skills of hoisting machinery command examination in 2022

LeetCode145. Post order traversal of binary tree (three methods of recursion and iteration)
随机推荐
一文搞定JVM常见工具和优化策略
透彻理解JVM类加载子系统
2:第一章:认识JVM规范1:JVM简介;
Alibaba Tianchi SQL training camp task4 learning notes
Use the rewrite rule to rewrite all accesses to the a domain name to the B domain name
Metasploit (MSF) uses MS17_ 010 (eternal blue) encoding:: undefined conversionerror problem
The difference between MVVM and MVC
2.13 summary
Thoroughly understand JVM class loading subsystem
Krypton Factor-紫书第七章暴力求解
6-axis and 9-axis IMU attitude estimation
Nacos 的安装与服务的注册
LeetCode102. Sequence traversal of binary tree (output by layer and unified output)
Openresty ngx Lua regular expression
The maximum happiness of the party
Yiwen gets rid of the garbage collector
Codeforces Global Round 19
Spectrum analysis of ADC sampling sequence based on stm32
Simple and beautiful method of PPT color matching
Leetcode buys and sells stocks