system-verilog

How can I make each module instance read from a unique file?

一笑奈何 提交于 2020-12-26 11:08:00
问题 In top.v, I generate X_MAX*Y_MAX instances of a pe module. In pe.v, I want to initialize a memory generated specifically for that instance. For example, at x=0,y=1: "pe_memory_x0_y0.dat". This is what my top-level module looks like: genvar x, y; generate for (y = 0; y < Y_MAX; y = y + 1) begin : ys for (x = 0; x < X_MAX; x = x + 1) begin : xs pe #( .X_MAX(X_MAX), .Y_MAX(Y_MAX), .X(x), .Y(y) ) pe_inst( .clk(clk), ... ); Inside pe.v, things like $display("Loading pe memory at (%0d,%0d)", X, Y);

What SystemVerilog features should be avoided in synthesis?

你。 提交于 2020-07-15 02:58:51
问题 SystemVerilog introduced some very useful constructs to improve coding style. However, as one of my coworkers always says, "You are not writing software, you are describing hardware." With that in mind, what features of the language should be avoided when the end result needs to be synthesized? This paper shows what features are currently synthesizable by the Synopsys tools, but to be safe I think one should only use the features that are synthesizable by all of the major vendors. Also, what

What SystemVerilog features should be avoided in synthesis?

Deadly 提交于 2020-07-15 02:58:27
问题 SystemVerilog introduced some very useful constructs to improve coding style. However, as one of my coworkers always says, "You are not writing software, you are describing hardware." With that in mind, what features of the language should be avoided when the end result needs to be synthesized? This paper shows what features are currently synthesizable by the Synopsys tools, but to be safe I think one should only use the features that are synthesizable by all of the major vendors. Also, what

What SystemVerilog features should be avoided in synthesis?

随声附和 提交于 2020-07-15 02:58:08
问题 SystemVerilog introduced some very useful constructs to improve coding style. However, as one of my coworkers always says, "You are not writing software, you are describing hardware." With that in mind, what features of the language should be avoided when the end result needs to be synthesized? This paper shows what features are currently synthesizable by the Synopsys tools, but to be safe I think one should only use the features that are synthesizable by all of the major vendors. Also, what

Difference among always_ff, always_comb, always_latch and always

情到浓时终转凉″ 提交于 2020-05-24 18:35:00
问题 I am totally confused among these 4 terms: always_ff , always_comb , always_latch and always . How and for what purpose can these be used? 回答1: always is the main type of process from Verilog, the other is an initial which is ran once at the start of a simulation. always_ff @(posedge clk) : Represents a flip-flop (ff), the process is triggered (executed) on every positive edge of the clock. This replaces always @(posedge clk) . This is the only type where non-blocking ( <= ) assignments

Constant padding in Verilog

末鹿安然 提交于 2020-05-16 01:56:05
问题 Here is the example behavioral Verilog code in question module constant; reg [7:0] foo; initial begin foo = 1'bz; $display("%H", foo); end endmodule Icarus Verilog gave me $ iverilog -o constant constant.v $ ./constant 0Z However, according to this website (and the lecturer of an FPGA course I am taking), If number is smaller than the size constant, then it will be padded to the left with zeros. If the most significant bit of a specified number has an unknown (x) or high-impedance (z) value,