资源简介
sata3 主控制器 FPGA
支持xilinx kintex7
全部源代码

代码片段和文件信息
# left_column[9] = disparity
# left_column[8] = conrtol
# left_column[7:0] = decoded 8
# right column[9:0] = encoded 10 in correct order : abcdefgh. Need to flip it because gtx spits out flipped data with flipped bit order
#
mem7f = []
for i in range(0x80):
mem7f.append(0);
filecontent = {}
for line in open(‘gtx_10x8dec_init_stub.v‘).readlines():
address_flipped_str = line.split()[1];
address_str = address_flipped_str[::-1]
address = int(‘0b‘ + address_str 2)
# retrieve everything but disparity - highest bit
value = int(‘0b‘ + line.split()[0][1:] 2)
# retrieve disparity
disparity = int(‘0b‘ + line.split()[0][0] 2)
# if disparity = 1 -> flag positive disparity 0 -> flag negative one
disp_pos = 1 if disparity == 1 else 0
disp_neg = 1 if disparity == 0 else 0
if address_str in filecontent:
disp_pos = 1 if filecontent[address_str][1] == 1 or disp_pos else 0
disp_neg = 1 if filecontent[address_str][2] == 1 or disp_neg else 0
filecontent[address_str] = [address disp_pos disp_neg value];
for key in filecontent:
(address disp_pos disp_neg value) = filecontent[key]
# if address == 0x2aa:
# print ‘2AA: ADDR>>4 = %X‘ % (address >> 4)‘ ADDR = ‘ bin(address) ‘ POS DISP = ‘ bin(disp_pos) ‘ NEG DISP = ‘ bin(disp_neg) ‘ VALUE = ‘ bin(value)
# print ‘ADDR = ‘ bin(address) ‘ POS DISP = ‘ bin(disp_pos) ‘ NEG DISP = ‘ bin(disp_neg) ‘ VALUE = ‘ bin(value)
to_mem = (disp_pos << 10) + (disp_neg << 9) + value
mem7f[address >> 4] = mem7f[address >> 4] + (to_mem << ((address % 16) * 16))
# if (address >> 4) == 0x2a:
# print ‘2AA: ADDR = %X to mem = %X total = %X ‘ % ((address )to_mem mem7f[address >> 4])# ‘ ADDR = ‘ bin(address) ‘ POS DISP = ‘ bin(disp_pos) ‘ NEG DISP = ‘ bin(disp_neg) ‘ VALUE = ‘ bin(value)
# if addr == 0x2aa:
# print “FLIPPED ADDR %s “ % address_flipped_str “ADDR %x “ % addr “ADDR7f %x “ % (addr >> 4) “VALUE %x “ % a
for i in range(0x80):
print ‘ .INIT_%02X\t(256\‘h%064X)‘ % (i mem7f[i])
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-07-29 11:46 host\
文件 10206 2017-07-29 11:46 host\crc.v
文件 4510 2017-07-29 11:46 host\drp_other_registers.v
文件 9579 2017-07-29 11:46 host\elastic1632.v
文件 5703 2017-07-29 11:46 host\gtx_10x8dec.v
文件 2170 2017-07-29 11:46 host\gtx_10x8dec_geninit.py
文件 10752 2017-07-29 11:46 host\gtx_10x8dec_init.v
文件 12328 2017-07-29 11:46 host\gtx_10x8dec_init_stub.v
文件 5142 2017-07-29 11:46 host\gtx_8x10enc.v
文件 587 2017-07-29 11:46 host\gtx_8x10enc_geninit.py
文件 10752 2017-07-29 11:46 host\gtx_8x10enc_init.v
文件 20368 2017-07-29 11:46 host\gtx_8x10enc_init_stub.v
文件 6471 2017-07-29 11:46 host\gtx_comma_align.v
文件 16068 2017-07-29 11:46 host\gtx_elastic.v
文件 66924 2017-07-29 11:46 host\gtx_wrap.v
文件 62390 2017-07-29 11:46 host\li
文件 24491 2017-07-29 11:46 host\oob.v
文件 10806 2017-07-29 11:46 host\oob_ctrl.v
文件 23546 2017-07-29 11:46 host\sata_phy.v
文件 5469 2017-07-29 11:46 host\scrambler.v
相关资源
- FPGA实现PID.v
- 基于FPGA的sdi视频传输工程(k7_sdi_rx
- FPGA彩条显示
- Xilinx-FPGA-引脚功能详细介绍.doc
- 基于xilinx FPGA的PCIe设计实战
- 基于PCIe的FPGA动态配置设计与实现
- 为什么工程师要掌握FPGA开发知识?
- 数字频率合成dds正弦波基于FPGA的DDS产
- 基于MIPS指令集的32位CPU设计与Verilog语
- Verilog FPGA UART串口控制器
- gmsk调制在FPGA上实现
- 一个简单的verilog编写的DMA IP CORE,和
- FPGA在步进电机驱动上的应用实例及代
- 硬件课程设计—流水灯(quartus软件
- Verilog按键代码
- verilog的PCI源代码,非常详细,顶层模
- 基于JM20329的SATA转USB 1394
- fpga实现频率测量
- FPGA开发-ChipScope教程
- 红外循迹小车VHDL程序
- CPLD Verilog数字密码锁 源码
- verilog 实现任意分频方法
- 基于FPGA的USB接口设计
- DE2模拟的交通红绿灯
- SPI Master 的Verilog源代码
- 一种抗SEU存储器电路的FPGA设计
- Cyclone 10LP Remote Update Intel FPGA IP 官方工
- nRF24L01无线模块在单片机与FPGA上的应
- 基于FPGA多协议转换网关设计
- 基于VGA的Flappy Bird的Verilog实现(源码
评论
共有 条评论