数字IC笔面基础——串并转换器(附Verilog实现)
写在前面的话串行转并行LSB优先MSB优先
并行转串行LSB优先MSB优先
总结
写在前面的话
串并转换是完成串行传输和并行传输这两种传输方式之间转换的技术。通过移位寄存器可以实现串并转换。串转并时,将数据移位保存到寄存器中,再将寄存器中的数值同时输出;并转串时,将数据先移位,再将寄存器中最高位或最低位的数值串行输出。 关键点: (1)串并转换的关键是在于触发器链,通过依次移位,输出最终结果。 (2)串并转换的思想是在设计中平衡面积和速度的要求,并行速度快,串行面积小。 (3)串并转换常常在接口中出现,将高速并行转为串行数据输出,或将低速的串行数据转为并行数据后高速计算。
串行转并行
LSB优先
// -----------------------------------------------------------------------------
// Copyright (c) 2014-2022 All rights reserved
// -----------------------------------------------------------------------------
// Author : HFUT904 [email protected]
// File : SIPO1_LSB.v
// Create : 2022-11-04 14:41:50
// Revise : 2022-11-04 14:41:50
// Editor : HFUT Integrated Circuit Design & Research Center
// Verdion: V1.0
// Description: 8bit 串行转并行 LSB优先 移位寄存器
// -----------------------------------------------------------------------------
module SIPO1_LSB (
input clk , // Clock
input rst_n , // Asynchronous reset active low
input din , // Serial input
output reg [7:0] dout // Parallel output
);
//LSB first
always @(posedge clk or negedge rst_n) begin : proc_
if(~rst_n) begin
dout |