/r/FPGA
A subreddit for programmable hardware, including topics such as:
A subreddit for programmable hardware, including topics such as:
Discord Server:
Related subreddits:
General Electrical and Computer Engineering discussion
General electronics discussion
Electronics help / discussion
Discussion on (hardware) chip design
Other FPGA related subreddits:
Links to tools to get started:
Meme posts allowed on Fridays ONLY. Please make sure to flair.
/r/FPGA
If I write VERILOG code is it correct to call it a design or a program? Or maybe something else.
Hi,
I've just finished 2 years graduate work as an Electrical Engineer working in the construction industry, I was designing circuits for electricians to install.
I really want to do something more cutting edge like FPGA or something else in electronics. I'm making around £40k a year.
Do you guys think I will need to step down significantly in salary in order to get the position?
Thanks
Let's say that one intends to get into intense FPGA design with mid-range FPGAs - models that mere mrotal can get his hands onto without selling his car in the process.
And perhaps run some SPICE etc simulations etc.
What PC should s/he look for:
Is all FPGAs Hard IPs "mapped from" pin configurations or ther's some specific HDL (VHDL, SysVerilog) lanugage extensions providing some features that are backed into fpga fabric?
My little bit of experience comes from Altera FPGAs
I am currently using FPGAs in an academic research project. I operate on a very low budget with my FPGAs being salvaged Kintex 7s on breakout boards from China. For the purposes of both cost and acoustics, I go for a cheap adhesive heatsink on the FPGA and a desk fan blowing on everything. In the worst case, I get around 75 °C die temperatures from the internal ADC which is under the specified maximum operating temperature of 85 °C.
From my experience previously using CPUs in a similar way, there is no issue running a loaded CPU 24/7 a few degrees from its thermal limits for years at a time. I always go for the lowest fan speeds I can get away with.
This point is not relevant to FPGAs, but the performance gains from better cooling via automatic frequency scaling on modern CPUs are never worth it for me. It's usually something like a 5% performance improvement at a dramatically increased cooler cost or cooler noise.
The Xilinx application notes seem overly conservative advising against adhesive heatsinks altogether. Hobbyists on the other hand tend to anthropomorphise their hardware and overcool it. Does anyone have interesting experiences or unconventional takes to share on this matter?
I have TerosHDL able to run my testbenches in Verilog, but I am seeing this error and wondering what it means and how to fix it. I am using ModelSim to run the simulations from TerosHDL.
Also, I have yosys installed from oss-cad-suite, but for some reason I cannot use the Schematic Viewer. When i hit the Schematic Viewer button all I see is:
2024-11-02 11:54:17.256 [info] Executing: C:\Windows\system32\cmd.exe C:\Windows\system32\cmd.exe /d /s /c "C:/oss-cad-suite/start.bat yosys.exe -p "read_verilog -sv "c:\Users\Gabriel\Desktop\FPGA\test.v"; hierarchy -top and_gate; proc; write_json f-2024102-8464-afgknu.l4uw6; stat""
2024-11-02 11:54:17.352 [info]
[OSS CAD Suite] C:\Users\Gabriel\AppData\Local\Temp>
Hii I have interview for digital design at cadence design system, plz provide any genuine tips for the preparation of online assessment or interview, which topic to study or so...
Is there a way to measure power on the ZCU104 without using the USB005 and XPE? Maybe an embedded C application or something?
To start, I am working on an SoC project with the Zynq 7020. Nearly every IP component I encounter uses some form of AXI interfacing, and while I understand its usefulness in the right context, I think its just plain overkill for many others.
In the project I am working in its been one of the biggest nuances to me and my partners. Can I just get a "ready" flag and a logic vector, or do we need this whole song and dance that requires three support components, memory maps, and more things to troubleshoot.
So my main question is really, once I start some chain of AXI masters and slaves, because some IP block requires it, is there ever any escape to simplicity again?
I try to run iverilog with a file list.
However, it doesn't work although I give the flist.txt every permission.
How can I fix that ?
There is a line in a verilog design as follows:
reg r_LED_1 = 1’b0;
What does 1’b0 do?
I'm using a Cyclone V 5CSEMA5F31C6, I want to fit a 32 bit RISC-V design that I made, but I'm using 48000/32000 ALMs. My design contains the ALU, the Program Counter, data memory, registers, and instruction memory.
I can see in the flow summary "Total block memory bits 0/4 million", I'm guessing that could be useful but I don't know how to use block memory in Quartus. Sorry if this is a stupid question.
I figured out how to generate some kind of file that connected ram adress and DQ pins to byte groups in data banks in groups.
I cant figure out how to find the pins for pcie.
Could someone help me with actually connecting pins of the memory and pcie slot with fpga pins in schematic and setting voltage levels?
I am used to dealing with microcontrollers and discrete components. I can handle the voltage regulators and decompiling caps. I can handle the length and impedence matching.
I just dont know how to draw the schematic. Pls help this fool
Also this is not my homework. I just like torturing myself.
So my country is really shit and increasingly dangerous as the time goes by so for the sake of my future and other people that will depend on me eventually i have been thinking about trying to go to US.
Robotics student right now,almost finished,planning to get masters in Digital systems while learning and doing projects on FPGA.In your experience,how willing are companies to sponsor someones visa,and how good would i have to be? Is it even possible for someone looking to get a foot into the industry rather then seniors and experienced engineers?
I am 23 right now so i have 2ish years to get my masters and learn as much as possible.
I ordered a mimas v2 Spartan 6 Fpga board . While searching for tutorials on how to program the device the only platform used is vivado ise which hasn't been updated and is only used on win10 . What resources or platforms do I use to program the device from here since vivado doesn't support Spartan 6 and started from the Spartan 7 series ???? Tl;Dr - need ide or platform to program Spartan 6 series fpga board that I ordered on win 11
Lets say i want to find leading one in N bit input in one cycle
Psuedo code for refernce
Always@ clk For(i=0;i<N;i=i+1) If (in[i]==1) begin
Out[i] <= 1'b1; Break;
End End
Break is not synthesizeable , I'm thinking to me some one hot based combo for input first and then use it
Any better way?
Yet another frustrated and exhausted post about the "wonders" of Vivado but I really need some help now. Basically, I'm trying to incorporate an IP from Xilinx (Floating Point IP) into my design by customizing it from the IP catalog. When I try to generate the output products out-of-context for this IP, Vivado keep the god forsaken error
[Common 17-55] 'set_property' expects at least one object.
Resolution: If [get_<value>] was used to populate the object, check to make sure this command returns at least one valid object.
I do not know where this comes from, my xdc file sets no properties, it just creates a clock, I can't find anywhere this set_property is used reasonably causing this error. For the first few times, I tried generating globally, but then after several attempts to get it work out-of-context, somehow switching back to global make synthesis to "Module not found"???
Someone please help me with this confusing problem. I have been searching all the internet for the past few days and still couldn't fix it. Thank you so much for your time and effort
I am only refering to sequential/synchronous logic.
What are some research papers or resources I should look at to give me some good ideas for a decent proposal. Any unique ways I can use an FPGA / Deep Learning Architectures to do data flagging, pattern recognition, time series analysis, ...etc! I hope I'm not being vague.
New to fpga design.
I have a working verilog code that will blink a led on the board.
Board is connected to my laptop using usb cable.
I want to understand in more detail about how my verilog code is put on the fpga.
“fpga tutorial” sites talk about rtl only.
I also read that there is sram onside fpga ic.
How is that used to put my code on the fpga ic.
Any webpage or yt video on this topic will be mighty helpful.
Thank you all.
I would like to sum for example 256 values of 16-bit. My current approach, in VHDL, is to create a function that sums the values in a loop, then add a bunch of register stages afterwards to allow backward retiming. I'm using Vivado and an UltraScale device.
Retiming seems to work, sometimes, but not always. I'm not sure whether the adder tree structure created this way is optimal. I have to investigate more. In the meantime, I wanted to ask what would be the best approach for this?
Hi everyone, I'm trying to get the following functionality written efficiently in SystemVerilog.
#include <stdio.h>
#include <stdlib.h>
#define NUM_ELEMENTS 8
int* sort_elements(int *data_array, char *valid_array, int *valid_elements) {
int out_idx = 0;
int *output_array = (int*)malloc(NUM_ELEMENTS*sizeof(int));
for (int in_idx = 0; in_idx < NUM_ELEMENTS; in_idx++) {
if (valid_array[in_idx] == 1) {
output_array[out_idx++] = data_array[in_idx];
}
}
*valid_elements = out_idx;
return output_array;
}
void print_array(int* data_array) {
printf("\n-------------------------------\n");
for (int i = 0; i < NUM_ELEMENTS; i++) {
printf("%0d ", data_array[i]);
}
printf("\n");
}
int main() {
char valid_array[NUM_ELEMENTS] = {0, 1, 1, 0, 1, 1, 0, 1};
int data_array[NUM_ELEMENTS] = {1, 2, 3, 4, 5, 6, 7, 8};
int num_valid_output_elements;
int *output_array;
output_array = sort_elements(data_array, valid_array, &num_valid_output_elements);
printf("%0d elements are valid in the transfer", num_valid_output_elements);
print_array(output_array);
return 0;
}
Basically, given an 'N-element' array which has some valid and invalid elements, we want to output an N-bit array where all the valid elements are next to each other. We also have another N-bit input array like a strobe signal to specify which input element is valid and which isn't.
I want to find the most efficient solution which can be scaled based on parameterization (array size) and pipelined easily.
The few solutions I have in mind is to use a simple parallel bubble-sort algorithm which moves elements with the corresponding strobe signal set to one side, and invalid elements to another side. This architecture, although easy to code doesn't really scale well as the number of elements increase since it would take N stages for the full sort. One more solution is to use priority encoders to determine the index of the MSB and use that as the select signal to the multiplexers which then output a valid element.
Any thoughts and guidance would be appreciated here. Thanks.
Edit:
I've provided a basic stub file to show the IOs of the design:
module remover #(
parameter NUM_ELEMENTS = 8,
parameter ELEMENT_BITWIDTH = 4,
localparam VALID_ELEMENTS_BITWIDTH = $clog2(NUM_ELEMENTS+1)
)(
input logic clk,
input logic areset_n,
input logic [ELEMENT_BITWIDTH-1:0] input_data [NUM_ELEMENTS-1:0],
input logic [NUM_ELEMENTS-1:0] input_strb,
input logic input_valid,
output logic [ELEMENT_BITWIDTH-1:0] output_data [NUM_ELEMENTS-1:0],
output logic [VALID_ELEMENTS_BITWIDTH-1:0] output_num_valid_elements,
output logic output_valid
);
// Example
// Input Transfer 1 input_data = [ 01, 02, 03, 04, 05, 06, 07, 08] input_strb = [0 0 1 1 0 1 0 0] input_valid = 1
// Input Transfer 2 input_data = [ 12, 10, 11, 02, 14, 07, 15, 15] input_strb = [0 0 0 0 0 0 1 1] input_valid = 1
// ...
// Output Transfer 1 output_data = [03 04 06 XX XX XX XX XX] output_num_valid_elements = 3 output_valid = 1
// Output Transfer 2 output_data = [15 15 XX XX XX XX XX XX] output_num_valid_elements = 2 output_valid = 1
// ...
endmodule
Any availability for IP Dev? How hard is it to get a job in IP development?
Any study material links?
I have been trying to build a petalinux project on my ubuntu machine only to find out that it does not work ...
Hey everyone, hope you are doing well.
I've recently started to design a RV32 core.
It's going well, but until now, I've used very basic instruction and data memories :
/**
* DATA MEMORY
*/
wire [31:0] mem_read;
memory data_memory (
// Memory inputs
.clk(clk),
.address(alu_result),
.write_data(32'b0),
.write_enable(1'b0),
.rst_n(rst_n),
// Memory outputs
.read_data(mem_read)
);
It's fun and all but I also know this is not really a good way to go. these single cycle BRAM (it's bram right ?) are good for now but I plan on actually using the core for larger projects later on, AKA I need to use DDR memory availible on my FPGA.
But how ?
I plan on using my core on Zynq SoC. Idk if it's important as well but my board is a Zybo Z7-20 but I guess this will be handled by Vivado when I'll work on the FPGA implementation ?
Looking forward to seeing your responses, have a good end of the week !
Edit : for simulation I use cocotb with icarus verilog (full open source haha)
I'm a newbie developing an undergraduate research on microarchitectures, but I'm having a really hard time building an ALU because of the various existing methods. I'm particularly stuck on the adder for a RISC-V build, because I'm really unsure of what to do with it and how to make it efficient with the least complex code possible. I'm using Quartus for this, writing code in SystemVerilog.
For now, I've looked at the look ahead carry, but it isn't appealing because of the complexity (I need to do something easier), yet the efficiency is something I really liked. I also started doing some combinational code, but for the size of the 32-bit ALU, it's turning a bit more extensive than I'd like.
I've learned from professors that an ALU should be combinational. Is it bad to make it into a sequential block? Is it less efficient? Thanks! I'm still learning all of this stuff.