Altera提供FPGA, CPLD和ASIC解决方案
  • 下载
  • 文档资料
  • 产品
    • 器件
    • 设计软件
    • IP
    • 开发套件/电缆
    • 设计和支持服务
    • 资料
  • 最终市场
    • 汽车
    • 广播
    • 计算机和存储
    • 消费类
    • 工业
    • 医疗
    • 军事和航空航天
    • 测试和测量
    • 无线通信
    • 有线通信
  • 技术中心
    • DSP
    • 外部存储器
    • 嵌入式处理
    • 收发器
    • 并行I/O
    • 信号完整性
    • 系统集成
  • 教育与活动
    • 培训中心
    • 大学计划
    • 网络研讨会和视频
    • 演示
    • 活动日程
  • 支持
    • 设计和支持资源指南
    • 知识数据库
    • 器件
    • 软件
    • IP
    • 开发套件和电缆
    • 设计范例
    • 参考设计
    • 下载
    • 用户社区和论坛
    • mySupport
  • 公司介绍
    • 关于我们
    • 客户成功案例
    • 合作伙伴
    • 新闻中心
    • 投资者关系
    • 保护环境
    • 职位招聘
    • 联系我们
  • 在线购买
    • 器件
    • 设计软件
    • 开发和教育套件
    • 电缆和可编程硬件
    • IP
  • 全部页面
  • 产品型号
  • 知识数据库
  • 支持&技术资料
  • 论坛 & Wiki

Verilog HDL: Atlantic 2-to-1 Width Converter

主页 > 支持 > 设计范例 > Verilog HDL > Verilog HDL: Atlantic 2-to-1 Width Converter

The AtlanticTM interface is a simple, standardized, on-chip data path interface that enables the rapid integration of IP MegaCore® functions. This register transfer level (RTL) design example shows how to connect together two MegaCore functions that have Atlantic interfaces of different widths. Figure 1 shows a typical application.

Figure 1 shows the connections for a sink-master, 2-to-1 converter block; the clock and reset signals are not shown. For every cycle of data from the source, the 2-to-1 converter writes two cycles of data to the sink. While it is writing the second cycle, the converter stops the source from providing new data. Because of this ability and requirement to turn off the source, a 2-to-1 converter can only function with a sink-master interface. To perform a 2-to-1 conversion for a source-master interface, a buffer is required to absorb data from the source, while the converter writes two cycles to the sink with the converter controlling the read side of the buffer, thereby turning the interface between the buffer and the sink into a sink-master interface.

Figure 1. Atlantic 2 to 1 Interface Width Converter Top-Level Block Diagram

Download the files used in this example:

  • atl_conv2to1.zip

The use of this design is governed by, and subject to, the terms and conditions of the Altera Hardware Reference Design License Agreement.

Table 1 lists and describes the signals.

Table 1. Atlantic 2-to-1 Width Converter Design Example Signals
Signal Type Description
clk Input Reference clock
reset_n Input Active-low, synchronous reset
ai_rddav Input Read data available Atlantic Input Interface

(Sink Master)
ai_rdena Output Read enable, connects to ena
ai_wrena Input Write enable, connects to val
ai_sop Input Start of packet
ai_eop Input End of packet
ai_err Input Errored packet
ai_dat[127:0] Input Data
ai_mty[3:0] Input Empty bytes
ai_adr[7:0] Input Address
ao_rddav Output Read data available Atlantic Output Interface

(Source Slave)
ao_rdena Input Read enable, connects to ena
ao_wrena Output Write enable, connects to val
ao_sop Output Start of packet
ao_eop Output End of packet
ao_err Output Errored packet
ao_dat[63:0] Output Data
ao_mty[2:0] Output Empty bytes
ao_adr[7:0] Output Address

Implementation

The following sections briefly discuss the implementation of the 2-to-1 Atlantic interface width converter design example.

Data Available (dav) Signal

The rddav signal is wired directly through the converter block from the source to the sink and is not used by the converter logic.

Read Enable (rdena) Signal

The sink’s rdena signal is used internally as an enable signal; therefore the output of the converter changes only when the sink allows it. This same rdena signal is used to drive the read enable to the data source; the converter uses this signal to make the data source provide new data only once every two clock cycles. The source’s ai_rdena signal is asserted only when the sink’s read enable signal is asserted, and then only when valid data is not provided.

Conversion Algorithm

Figure 2 shows the conversion algorithm flowchart. As you can see, the converter block does nothing if the read enable from the sink is not asserted; the outputs remain fixed. If the read enable is asserted, and the tophalfsent flag is not asserted (meaning that a two-cycle transfer to the sink has yet to start), then the converter block waits for the source’s ai_wren signal to be asserted, telling it that there is new data.

When new data is available, the converter loads the top half of the input data into the output data register, and sets the sop, addr, and err flags according to the inputs. As long as the input is not an EOP and the bus is not mostly empty, the converter stops for this cycle, and continues loading the bottom half of the bus on the next cycle. If the input is an EOP and the bus is mostly empty, then the converter asserts the sink’s EOP, thus setting the mty value for the smaller bus width. This completes the transfer to the sink, but the source’s ai_rdena signal has yet to be asserted, so on the next clock cycle, there will not yet be new data available; ai_wren will still be set with the old data. To get around this, the tophalfsent flag is left asserted, causing the next clock cycle to be wasted.

On the second cycle, assuming ai_rdena is asserted, the tophalfsent flag is set, meaning that the top half of the data has already been sent out at the inputs, and only the bottom half remains to be sent. The output registers are updated with the bottom half of the input data bus, and the tophalfsent flag is cleared so that the converter is ready for a new transfer. If the input is not a mostly-empty EOP transfer, then ao_wren is asserted, driving the data to the sink. If the input is a mostly-empty EOP transfer, this cycle is wasted.

Figure 2. Atlantic 2-to-1 Bus Width Converter Decision-Making Flowchart

Related Links

For more information about using this example in your project, go to:

  • Atlantic Interface Web Page
  • Atlantic Interface Specification
  • Atlantic 1-to-2 Bus Width Converter Design Example
  • List of MegaCore functions using the Atlantic Interface
  • How to Use Verilog HDL Examples

Design Examples Disclaimer

These design examples may only be used within Altera Corporation devices and remain the property of Altera. They are being provided on an “as-is” basis and as an accommodation; therefore, all warranties, representations, or guarantees of any kind (whether express, implied, or statutory) including, without limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed. Altera expressly does not recommend, suggest, or require that these examples be used in combination with any other product not provided by Altera.

给本页评分


  • 产品
    • MAX/MAX II
    • Stratix/Stratix GX
    • Nios II
  • 功能
    • 算法
    • 存储器
    • 总线及I/O
    • 逻辑
    • 接口与外设
    • DSP
    • 通信
    • PLL & Clocking
  • 设计输入方法
    • Quartus II软件工程
    • Tcl
    • VHDL
    • Verilog HDL
    • C Code 范例
    • DSP Builder
    • TimeQuest
    • 片内调试
      • SignalTap II
  • 仿真工具
    • Mentor Graphics ModelSim
    • Cadence NCsim
    • Synopsys VCS
  • 旧范例
    • 图形编辑器
    • AHDL
    请填写反馈意见
    产品 | 最终市场 | 技术中心 | 教育与活动 | 支持 | 公司介绍 | 在线购买
    联系我们 | 站点帮助 | 网站导航 | 个人信息 | 法律申明
    Copyright © 1995-2010 Altera International Limited. 版权所有
    Altera Forum
    Altera
    论坛
    RSS
    RSS
    Flickr
    Flickr
    Email Updates
    电邮新闻