# Tag Info

32

What is the motivation in using hardware description languages (HDL) such as Verilog and VHDL over programming languages like C or some Assembly? C and assembly are good languages for telling a CPU what to do. They describe actions to be done sequentially by a single state machine. HDLs are good languages for describing or defining an arbitrary collection ...

24

Although it's true that creating a chip is very expensive, TSMC and other fabs do provide "shuttle services" that put many devices from many people on the die and reduce the price significantly. I've even hear a company getting a few samples of it's devices for $1500, which is extremely low when you consider the alternatives. Before anything, it's best to ... 20 HDL is the catch all name for all hardware definition languages (Verilog, VHDL, etc.) in the same way Object Oriented can refer to C++, Java, etc. RTL on the other hand is a way of describing a circuit. You write your RTL level code in an HDL language which then gets translated (by synthesis tools) to gate level description in the same HDL language or ... 19 Short answer: use SystemVerilog, but learn also VHDL. Avoid Verilog-2001 if you can. Very long answer: for the moment, I assume by Verilog you mean Verilog-2001 which is probably what also most other answers assume. The best suggestion would probably be to learn both, but use neither (more on this at the end of the answer). The main differences can be ... 14 HDL (Hardware description Language) is the type of language used, Verilog/VHDL versus a non-HDL javascript. RTL (Register-transfer level) is a level of abstraction that you are writing in. The three levels I refer to are Behavioural, RTL, Gate-level. Behavioral has the highest layer of abstraction which describes the overall behavior and is often not ... 12 My career for last 13 years was 80% ASIC and 20% FPGA. VHDL was used for the 1st 3.5 years and the rest were Verilog. I didn't find switching to Verilog difficult, and for location (Silicon Valley) & speed reasons I only code in Verilog today. Also, I do a lot of Async interfaces, latches and gate level semi custom designs for performance, so VHDL has ... 11 For the first part of your question, about the motivations of using one or the other: there is a fundamental difference between C and HDLs (VHDL/Verilog). C is a software programming language (as assembly is), VHDL/Verilog are hardware description languages. They are not meant for the same purpose. C is translated into assembly code (in its binary form, i.e.... 9 I went for VHDL, mostly because I know C really well and found that trying to write verilog tended to have me writing as if I was targeting a CPU not describing hardware. Very annoying to write a page of code and realise what you wrote was effectively a sequential program not a hardware design, yea it would synth, but the result was ugly and slow. VHDL ... 9 Yes, it is possible to do high level logic (HLL) design using C or C-like languages. Here is a list of the more popular software tools: C-to-Hardware (Altera) C-to-Hardware Compilation Technology (Altium) C-to-Silicon Compiler (Cadence) C-to-Verilog (Nadav Rotem, free and open sourced) Cascade (CriticalBlue) Catapult-C (Calypto) Comrade (Hagen Gädke) ... 9 It is certainly possible to program (using and HDL) and do useful tasks on FPGAs without using any third party IP blocks - if that is what you meant. However you do still have to use the vendors synthesis tools. Synchronous state machines etc written in appropriately structured VHDL easily synthesize onto the LUTs and flip flops and multiplexers in an FPGA ... 9 There may be a misunderstanding about what 'IP' means. It's possible to program the fabric of an FPGA, that is the programmable LUTs and things, from the ground up. However, the bits and gates and tables in a Xilinx and an Altera are different, and are different from family to family, so it's like assembly coding a micro, they all have different low level ... 9 Add a generic clause to your entity. It allows you to pass in e.g. constants: entity counterTst is generic ( constant COUNTER_LEN : integer -- := 4 ); port ( enable: in STD_LOGIC; clk: in STD_LOGIC; rst: in STD_LOGIC; output: out STD_LOGIC_VECTOR(COUNTER_LEN - 1 downto 0) ); end counterTst; architecture rtl of ... 8 Now by end of 2018, a company is working on a platform "Itsy-Chipsy" (assuming a software tools collection plus fab services) to produce two prototype chips for about$400 at a 350x350um size which can fit 14000 gates. If the area size is further divide by 4, down to 170x170um, the cost would be about $100. The$100 price is based on the pricing of a 2x2mm ...

8

FPGA code works in behavioral simulation but not in hardware This happens sometimes. So maybe something is wrong with the hardware, and maybe the simulation doesn't accurately model what happens in reality. Have to check both. I assume you're a student, since there is free ready-made code that already implements serial UARTs, so my answer is about how to ...

8

You have a conceptual difficulty here. VHDL is not a program in the computer program sense, it is a DESCRIPTION how hardware elements are connected. There is no particular order. Once you "program" the VHDL code into FPGA, it creates proper links between logical blocks and configures them. Once you turn the power on and configuration bits are loaded into ...

7

I generally take a top-down design approach, and I start by drawing a block diagram that shows the interfaces among the top-level blocks. I then draw additional diagrams that represent the implementations of the top-level blocks in terms of lower-level blocks. This hierarchy of block diagrams translates pretty much directly to the hierarchy of the HDL ...

7

always @ ( signal 1, signal 2......) is a construct used in behavioural modelling. The code which is present in the block following this construct will run only when any of the signals in the sensitivity list viz signal 1, signal 2... changes. If you put only posedge clock in the list, the code will run only when there is a positive clock edge and not ...

7

Forget that rule. Here's a simpler one: If you want sequential logic, use always @(posedge clock) (or negedge). You don't need to mention any other signals in the sensitivity block. (You can sometimes also use sensitivity lists like always @(posedge clock or posedge reset) for reset signals, but don't try to get too fancy. It's very easy to create ...

6

Yes, it is legal SystemVerilog. Refer to IEEE Std 1800-2012 § 10.9 Assignment patterns my_struct s = '{default:'1, c:0}; is equivalent to my_struct s = '{a:16'hFFFF, b:16'hFFFF, c:16'h0000}; my_struct s = '{default:0, c:'1}; is equivalent to my_struct s = '{a:16'h0000, b:16'h0000, c:16'hFFFF}; Your version Vivado might not have implemented the default:...

6

You have a module which must process the data multiple times in a row to complete the conversion. In the 'pipelined' example, you simply feed through each in turn. This will have some latency as the data takes some time to go from the input to the output. However if the blocks are truly pipelined, this is just a latency - you can feed in a new data word on ...

6

Yes, it is called a 'generic': I could show an example here, but there are plenty of example on the WWW once you know what to look for: https://www.nandland.com/vhdl/examples/example-generic.html

5

The Xilinx tools can't interface in real-time as far as I know, neither can ModelSim (used by Actel's Libero IDE) I don't know about open source simulators, there are some rather exotic projects out there so it's possible there is something that could do this. However, this may be you an answer you didn't ask for (I'll delete it if it's not helpful), but ...

5

Behavioral code is higher-level and usually can't be synthesized. Constructs like loops, delays, and "initial" statements are behavioral. RTL code is lower-level and is intended to be synthesized. It defines a circuit as a combination of interconnected registers and the operations performed on signals between those registers. Taken from Yahoo Answers and ...

5

This question really needed a bit more context than simply "How does backdoor memory access work?". A link to a 198 page document for us to read, in order to guess what you are asking, is not really conducive to getting good answers. Even basic context such as "in the context of HDL simulation" which appears to be what you're asking, would help. That being ...

5

I'll weigh on my two cents: I'm a heavy VHDL user myself, but Verilog can certainly get the job done just as well. You can always wrap one in another (albeit with a time and typing cost). What I've found is that raw VHDL lacks a lot of handy functions. (OR or AND:ing a whole std_logic_vector comes to mind). Thus, building yourself a toolbox of debugged, ...

5

You can, though the details are a lot more involved and it's an expensive process; probably only worth considering if you need a million such chips. More normally you would buy a "blank chip" called an FPGA, and compile the design for that chip, using the vendor's own (often free) tools. Usually the design is programmed into a second chip (a ROM) and loaded ...

5

When looking to understand what's happening in a HDL in general, it's a good idea to think about what's going on in the actual hardware. There isn't a concept of "execution" in an FPGA in the same way that there is in a CPU. I was taught that when you read a concurrent statement, you read it as Q is driven by not out1. In hardware, the above concurrent ...

Only top voted, non community-wiki answers of a minimum length are eligible