您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > 基于FPGA的CAN设计
毕业设计说明书基于FPGA的CAN总线控制器设计专业电子信息工程学生姓名XXX班级BXXX学号XX指导教师XX完成日期2012年6月2日盐城工学院本科生毕业设计说明书(2012)基于FPGA的CAN总线控制器设计摘要:CAN被称为最有前途的总线之一,但是市面上存在的都是标准定制的CAN控制器芯片,因此从ASIC设计思想出发,基于FPGA设计定制功能的CAN控制器芯片,扩展其功能,是十分有意义的。设计的重点是CAN总线控制器的设计,即用VerilogHDL语言完成CAN每个模块的设计能够在FPGA开发平台Quartus上通过仿真验证,证明其正确性。设计从CAN控制器底层着手,首先分析领会CAN协议,其次比较分析现有的CAN控制器后,将CAN总线控制器分解成各个相互独立却又相互关联的功能模块,并且对各个功能模块的功能和原理深入的理解。再进一步阐述对各功能模块进行设计的思想及设计流程,进行设计,并且进行仿真。仿真波形分析包括:第一,证明设计出的模块逻辑功能的正确性;第二,通过Quartus软件的自动综合,生成网表之后,仿真证明设计的实际性。设计将CAN总线分解成三大模块:设计寄存器逻辑模块,完成对数据,控制器状态以及处理器命令的的存储和读写功能;设计验收滤波器模块,完成帧的标识符的校验,保证帧的标识符的匹配;设计位流处理器模块,完成控制发送缓冲器、接收FIFO和CAN总线之间的数据流,接受帧发送帧等功能。关键词:VerilogHDL;FPGA;CAN总线盐城工学院本科生毕业设计说明书(2012)DesignofCANBusControllerBasedonFPGAAbstract:AsoneofFieldBuses,CANBusiswidelyusedinmanyareas.AnditisconsideredtobeoneofthemostpromisingBuses.Butchipsavailableinthemarketarecustomizedwithallkindsofstandards.SofromtheideaofdevelopingASIC,wecanmakeuseofFPGAtodesignanapplicationspecificCANcontroller,hencetoitsfunctions,whichisverymeaningful.Themainpurposeistocompletethefront-enddesignofCANcontrollerusingFPGA.ThatmeanstocompletetheRTL-leveldesignofDataLinkLayerinCANProtocolbyusingVerilogHDL,andtoachieveitsfunction,thentoevaluatethedesignthroughthesimulationontheplatformQuartusII.Inthethesis,ourworkisstartedfromthelowerlevel.Firstly,weanalyzetheCANProtocol.Secondly,we'splittheentireCANcontrollerintoseveralmoduleswhichareindependentbutassociatedwitheachother.Thirdly,theirfunctionandprincipleareintroduced.Atlast,wemanagetodesignthemodulesinRTL-level,toexplaintheideaandprocess,andtoimprovedesignfortimingcorrectlybysimulation.Thesimulationisdividedintotwoparts:Oneisthelogicfunctionsimulation,theotherissimulationincludinginformationofthenetlistandgatedelay.Withinthewholedesign,wesplitCANcontrollerintothreemodules.RegisterLogicModuleisusedtosavetheframeinformation,statusandcommands.Wecantransferthedatawritingtoandreadingfromitself.AcceptanceFilterisusedtochecktheidentifier.BitStreamProcessor,thecorepartofthecontroller,isnotonlyusedtocontrolbitstreambetweenTXB,RXFIFOandCANbus,butalsocompletethefunctionofreceivingandtransmitingframesofdata.Keywords:VerilogHDL;FPGA;CANBUS盐城工学院本科生毕业设计说明书(2012)目录1绪论................................................................11.1CAN总线简介.......................................................11.2VerilogHDL与FPGA简介............................................11.3课题研究的意义....................................................21.4说明书结构........................................................22CAN总线协议介绍.....................................................32.1简介.............................................................32.2基本概念.........................................................42.3报文传输..........................................................72.3.1帧格式...........................................................72.3.2帧类型...........................................................72.3.3关于帧格式的一致性...............................................82.3.4发送器/接收器的定义..............................................82.4报文滤波...........................................................82.5报文校验...........................................................82.6编码...............................................................92.7错误检测...........................................................93CAN总线控制器设计..................................................103.1CAN总线控制器总体模块...........................................103.2寄存器模块设计...................................................113.2.1寄存器模块.....................................................113.2.2寄存器单元模块..................................................113.2.3寄存器模块的输入输出信号的定义.................................143.2.4往寄存器写入数据................................................153.2.5从寄存器读出数据................................................153.3位时序逻辑设计...................................................173.3.1位定时设计......................................................173.3.2采样点设计.....................................................183.3.3位同步设计......................................................193.4位数据流处理器..................................................203.4.1CRC校验模块can_crc设计........................................223.4.2反向位秩序模块can_ibo设计.....................................243.4.3接收滤波器can_acf模块设计.....................................243.4.4先进先出控制模块can_fifo设计..................................263.5波特率分频器.....................................................274CAN总线控制器的测试与仿真..........................................284.1can_top设计......................................................284.2can_topTestbench顶层模块设计与仿真..............................28致谢.............................................................31参考文献.............................................................30附录.................................................................31盐城工学院本科生毕业设计说明书(2012)11绪论1.1CAN总线简介控制器局域网CAN(ControllerAreaNet)是一种现场总线,主要用于各种过程检测及控制。CAN最初是由德国BOSCH公司为汽车监测和控制而设计的,目前CAN已逐步应用到其它工业控制中,现已成为ISO-11898国际标准。CAN总线有以下特点:a)CAN可以是对等结构,即多主机工作方式,网络上任意一个节点可以在任意时刻主动地向网络上其它节点
本文标题:基于FPGA的CAN设计
链接地址:https://www.777doc.com/doc-3856276 .html