Giter VIP home page Giter VIP logo

displayport_verilog's Introduction

DisplayPort_Verilog

A open source Verilog implementation of DisplayPort protocol for FPGAs, released under the MIT License.

DisplayPort is quite a complex protocol. This is a minimal Verilog implementation in the Verilog language. Hopefully this will inspire others to improve on this.

This has now been tested using one or two lanes, and 800x600, 720p, 1080p and 2160p resolutions, but should work with four lanes too. YCC and 442 video are supported.

Status

Note that this is still very alpha. It works for me on my hardware, but I don't expect it will work for you with a bit of effort.

Contributions

Please feel free to send pull requests, and please make sure you add your name to the file headers. Also feel free to remove my headers for any new files you may add to the project - you deserve the credit not me!

Please make sure that where possible all files include the MIT License information.

My Test setup

My own test board is a Digilent Inc Nexys Video, using an Xilinx Artix 7 FPGA. However the most of the hardware specific parts are limited to the transcievers which can be replaced to support FPGAs from other vendors.

For a test display I have been using a ViewSonic VX2880ML, which is an older 4k monitor.

I will endevor to test with a few more monitors.

Tested resolutions

Resolution | Lanes | Colour Mode | Effective Pixel clock rate
-----------+-------+-------------+--------------
800x600    |   1   | RGB 444     |  40.00 MHz
800x600    |   2   | RGB 444     |  40.00 MHz
800x600    |   3   | RGB 444     |  40.00 MHz
1280x720   |   1   | RGB 444     |  74.25 MHz
1920x1080  |   2   | RGB 444     | 148.50 MHz
3240x2160  |   2   | YCC 422     | 165.00 MHz

There are in the src/test_streams directory. To change patterns, edit src/test_stream.v, switch the module name, and rebuild the file

These test streams are very crude, and could be greatly improved on.

The M/N problem

DisplayPort have M and N values embedded in the data stream, which represent the ratio of the pixel clock to the lane symbol rate. For example 148.5MHz 1080p has a ratio of 11 to 20 of the 270MHz link speed. It also should embed the lowest 8 bits of the 'M counter' in the stream, to allow the sink to regenerate the pixel clock.

However 11:20 (or 22:40, or 2200:4000 or any other exact ratio) does not work but 0x4688:0x8000 (18,056:32768) does. I do not understand this. If somebody could explain this to me so I can document this I would be most greatful.

I suspect is has something to do with the ability for the source to down-spread the link speed, and the sink must be able to correct for this.

displayport_verilog's People

Contributors

hamsternz avatar lulinchen avatar mithro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

displayport_verilog's Issues

dp_aux_messages.v

line227 ~line285

Bit 4:3 = PRE-EMPHASIS_SET,your code set Bit 5:4 = PRE-EMPHASIS_SET

some question on my borad genesys2 and nexys video

hello ๏ผŒ
I am using it on my genesys2 board with GTX ,but I have some questions:
1.this project cannot work on my 4k displayer with the test source 3840*2160YCC_422_CH2
2.it cannot work with the tese_source_800_600_Ch4 since I have changed the "source_channel_count" from 3'b010 to 3'b100 because I want to use 4 channels
3.in Displayport Standard V1.2.PDF,I don't find some detailed examples or informations which describes the relationship between TU and symbol_clk or stream_clk,so I cannot understand the TUs' arrangement in your test sources

now I want to wirte a project which can support 4K 60fps display,if you can help me ,I would thank you very much

typo in 720p video generator

file: /test_streams/test_source_720p_RGB_444_colourbar.v
'localparam [8:0] MVID' according M calculation should be 0x033, but there's a typo 0x68 there. However it doesn't cause any issues.

link_signal_mgmt.v

line103
assign preemp_level = channel_adjust[3:0];

it shoud be
assign preemp_level = channel_adjust[3:2];

Pixel bleed?

When showing the 800x600 colour bars the transition between some colour transitions show unexpected artifacts that look to be one pixel wide, on the blue channel. It looks to be offset one pixel to the right.

This might be a "works as expected" with monitors image scaling, but is more likely to be an error in the test pattern.

insert_main_stream_attrbutes_four_channels.v

line182 default: out_data[53:36] <= { in_data[53:44], in_data[44:36]};
it should be
default: out_data[53:36] <= { in_data[53:45], in_data[44:36]};

line196 default: out_data[71:54] <= { in_data[71:64], in_data[63:56] };
it should be
default: out_data[71:54] <= { in_data[71:63], in_data[62:54] };

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.