当前位置:网站首页>(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
边栏推荐
猜你喜欢
2:第一章:认识JVM规范1:JVM简介;
First, redis summarizes the installation types
Paddle Serving v0.9.0 重磅发布多机多卡分布式推理框架
[speech processing] speech signal denoising based on Matlab GUI Hanning window fir notch filter [including Matlab source code 1711]
Week 17 homework
VOT Toolkit环境配置与使用
Registration and skills of hoisting machinery command examination in 2022
Common JVM tools and optimization strategies
Element positioning of Web Automation
d3dx9_ What if 29.dll is missing? System missing d3dx9_ Solution of 29.dll file
随机推荐
Paddle Serving v0.9.0 重磅发布多机多卡分布式推理框架
Multi view 3D reconstruction
Three.JS VR看房
513. Find the value in the lower left corner of the tree
Vision Transformer (ViT)
一文搞定class的微觀結構和指令
February 13, 2022 -5- maximum depth of binary tree
[speech processing] speech signal denoising and denoising based on Matlab GUI low-pass filter [including Matlab source code 1708]
Registration and skills of hoisting machinery command examination in 2022
Metasploit (MSF) uses MS17_ 010 (eternal blue) encoding:: undefined conversionerror problem
First, redis summarizes the installation types
LeetCode102. Sequence traversal of binary tree (output by layer and unified output)
如何快速理解复杂业务,系统思考问题?
ORB_ SLAM2/3
Selenium+pytest automated test framework practice
Masked Autoencoders Are Scalable Vision Learners (MAE)
Composition of interface
Global and Chinese market of networked refrigerators 2022-2028: Research Report on technology, participants, trends, market size and share
Detailed explanation of pointer and array written test of C language
第十七周作业