Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12597 Discussions

using UART in DE1-SoC board

Altera_Forum
Honored Contributor II
2,707 Views

Hi, 

 

I am using a DE1-SoC board. I am trying to hands-on few basic projects. My question is, can I not use the UART to visualize the output directly, instead of using it with a Nios II core or the HPS? Say, I have a simple counter in verilog, is there a way, I can just display the counter output through UART, without the NIOS II or the HPS? 

 

Thanks!
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
986 Views

yes there is, assuming your counter counts slower than your uart takes to send or you are not intrested in all the values. However a uart is not one of the first projects I would suggest to a beginner. It is relatively easy to create but you need a few basic skills. Do you have leds? Those are much easier to use but you might want to slow down the clock to see it coumt on the lsb's.

0 Kudos
Altera_Forum
Honored Contributor II
986 Views

Building a UART is pretty darn simple, especially a Tx-only UART as would be needed here. But the DE1-SoC board also has a bunch of LEDs and a 7-segment display. I agree with Pieter that driving those would be an easier and better way to go for displaying a counter than a UART. The UART is probably connected to the SoC anyway.

0 Kudos
Altera_Forum
Honored Contributor II
986 Views

 

--- Quote Start ---  

Building a UART is pretty darn simple, especially a Tx-only UART as would be needed here. But the DE1-SoC board also has a bunch of LEDs and a 7-segment display. I agree with Pieter that driving those would be an easier and better way to go for displaying a counter than a UART. The UART is probably connected to the SoC anyway. 

--- Quote End ---  

 

 

 

Hi, 

 

Yes, I have tried displaying on LEDs n Seven Segment Display already, as a part of the beginner projects. The design I want to implement finally is a DCT (Discrete Cosine Transform) of an image. The output of the DCT is in form of a bitstream, which I need to capture. So, I want to use UART. I agree that it would be a TX-only UART. Could you pls giude me through the usage? Do I need to write the code for the UART transmitter? or just connecting with the HPS_UART_TX pin serve my purpose?
0 Kudos
Altera_Forum
Honored Contributor II
986 Views

 

--- Quote Start ---  

Hi, 

 

Yes, I have tried displaying on LEDs n Seven Segment Display already, as a part of the beginner projects. The design I want to implement finally is a DCT (Discrete Cosine Transform) of an image. The output of the DCT is in form of a bitstream, which I need to capture. So, I want to use UART. I agree that it would be a TX-only UART. Could you pls giude me through the usage? Do I need to write the code for the UART transmitter? or just connecting with the HPS_UART_TX pin serve my purpose? 

--- Quote End ---  

 

 

For that kind of transfer I would get software involved and have the HPS transfer the file for you. In your first post you implied that you did not want to use a processor, but due to the fact that you don't know how to design a UART, plus the size of the bistream you want to transfer, I think you would be better off using using the HPS. Of course then you have to find a way to get the FFT result to the processor, which complicates the design further. But I assume you're developing on an SoC for a reason (i.e., you needed a processor). If you're going to make use of the processor eventually anyway, now would be a good time to dive in. 

 

If the UART is tied to HPS pins on the DE1-SoC then I'm not sure you can drive the UART from the FPGA fabric anyway, which would rule out a NIOS or you driving the UART directly from logic. You would have to research that and see what your options are. If you can drive the UART from the fabric then it would not be very difficult to spin the FFT result out to the UART using a state machine. Sorry, I don't have time to help you with the UART design. Do a little research and you'll figure it out.
0 Kudos
Altera_Forum
Honored Contributor II
986 Views

Hi 

In the case I have the state machine code in VHDL and I want to drive UART directly from FPGA, what is the correct way to configure the HPS, is necessary to program the procesor too?
0 Kudos
Reply