synthesis

Chisel runtime error in test harness

…衆ロ難τιáo~ 提交于 2019-12-11 04:01:14
问题 This Chisel code works ok: chiselMainTest(Array[String]("--backend", "c", "--genHarness"), () => Module( new Cache(nways = 16, nsets = 32) )){c => new CacheTests(c)} However this one - a small variation - produces run-time error: val cache_inst = new Cache(nways = 16, nsets = 32) chiselMainTest(Array[String]("--backend", "c", "--genHarness"), () => Module(cache_inst)){c => new CacheTests(c)} [error] (run-main) java.util.NoSuchElementException: head of empty list java.util

VHDL - “Input is never used warning”

北城以北 提交于 2019-12-11 00:14:45
问题 I've written a program in VHDL (for Xilinx Spartan-6) that increments a counter whilst a button is pressed and resets it to zero when another button is pressed. However, my process throws the error WARNING:Xst:647 - Input is never used. This port will be preserved and left unconnected... for the reset variables - despite the fact that it is used both in the sensitivity of the process and as a condition (just as much as button , yet that doesn't get flagged!). binary_proc : process(CLK_1Hz,

iOS sine wave generation - audible clicking

喜夏-厌秋 提交于 2019-12-10 21:47:05
问题 I am in the process of creating a synthesiser for iOS. After playing around and attempting to learn core audio, I have encountered a problem that I cannot get my head around. My sine wave makes a clicking noise on regular intervals, which Im guessing is related to the phase. I have looked at several guides and books on the subject, and all suggest that I am doing it correctly. If anybody would be so kind to look at my code for me it would be greatly appreciated. static OSStatus renderInput

Making Midi Files in Python that are Polyphonic and Different Instruments [closed]

随声附和 提交于 2019-12-10 11:42:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . I'm looking for a midi library in Python that will allow me to create a polyphonic midi file using different instruments. What seems to get recommended here alot is MidiUtil. Although, it seems to have support for polyphony, I can't seem to change the instrument from piano. Can anyone recommend an alternative

Seven Segment Multiplexing on Basys2

无人久伴 提交于 2019-12-06 14:04:38
this is my first post so I hope I'm doing this correctly. I'm trying to output a "4 3 2 1" on a four digit seven segment display on a BASYS2 board. I have checked to make sure that 0 enables the signal and that I have the ports mapped correctly. I believe the error is within my multiplexing logic since I am only able to display a single digit. I'm new to Verilog (am used to C) and would appreciate any suggestions. Thanks `timescale 1ns / 1ps module main (clock, AN0, AN1, AN2, AN3, CA, CB, CC, CD, CE, CF, CG, CDP); //USED FOR SEVEN SEG input clock; output AN0, AN1, AN2, AN3, CA, CB, CC, CD, CE,

Why is rising edge preferred over falling edge

别说谁变了你拦得住时间么 提交于 2019-12-05 01:16:33
Flip-Flops(,Registers ...) are usually triggered by a rising or falling edge. But mostly in code you see an if-clause which uses the rising edge triggering. In fact i never saw a code with falling edge. Why is that? Is it because naturally the programmers use rising edge, because they are used to, or is it because of some physical/analog law/fact, where the rising edge programming is faster/simpler/energy-efficient/... ? As zennehoy says, it's convention - but one going back to when logic was done in discrete chips with a few gates or flipflops within them. Those packages of flipflops were

Verilog sequence of non blocking assignments

假如想象 提交于 2019-12-04 11:29:30
问题 Say the following code section (same block): A <= 1 A <= 2 Will variable A always be assigned 2? or will there be a race condition and 1 or 2 will be assigned ? My understanding of non blocking assignment is that it is up to the hardware to assign the variable A at a future time so it could be a random result. However, this is non intuitive. Simulations show that 2 always get assigned, but I would like to know if this is definitely the case for hardware synthesis. 回答1: A would be 2 in

VHDL synthesis warning FF/Latch has a constant value of 0

对着背影说爱祢 提交于 2019-12-04 03:54:14
问题 I'm trying out some code that essentially involves using an FPGA and reading values from a temperature sensor. The code is below: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity ds18b20 is Port ( clk : in STD_LOGIC; --50Mhz oscillator onboard dq : inout STD_LOGIC; temp_h : out

VHDL Place and route path analysis

南楼画角 提交于 2019-12-02 09:19:18
my problem is that when I implement my design using Xilinx ISE 14.7 + XPS I often obtain a very different number of analyzed paths in the static timing analysis, also having very few differences in the .vhd files. In particular, the only file that I change (or that I think to change...) is something like: entity my_entity is( ... data_in : in std_logic_vector(N*B-1 downto 0); ... ); end entity my_entity; architecture bhv of my_entity is signal data : std_logic_vector(B-1 downto 0); signal idx_vect : std_logic_vector(log2(N)-1 downto 0); signal idx : integer range 0 to N-1; ... begin process

How to NOT use while() loops in verilog (for synthesis)?

大兔子大兔子 提交于 2019-12-02 00:48:24
I've gotten in the habit of developing a lot testbenches and use for() and while() loops for testing purpose. Thats fine. The problem is that I've taken this habit over to coding for circuits which should be synthesizable. XST and others refuse to synthesize code (without additional modification to synthesis parameters) such as: while (num < test_number) begin . . . num = num+1; end This is bad coding style because to the synthesizer test_num is an int with value 2^32! or it sees it as unbounded parameter. Either way, its a bad coding habit. But I'm so used to doing this in C and testbenches.