Skip to main content
Filter by
Sorted by
Tagged with
25 votes
4 answers
26k views

I came across this excerpt today: On most older microprocessors, bitwise operations are slightly faster than addition and subtraction operations and usually significantly faster than ...
William Breathitt Gray's user avatar
17 votes
3 answers
49k views

I suddenly realized that there is no Altera Quartus or Xilins ISE or ModelSim on Mac OS X. What do people use to at least simulate VHDL and schematic designs on Macs?
Vladimir Keleshev's user avatar
12 votes
10 answers
37k views

Lately I bumped repeatedly into the concept of LFSR, that I find quite interesting because of its links with different fields and also fascinating in itself. It took me some effort to understand, the ...
MattiaG's user avatar
  • 241
11 votes
4 answers
39k views

I'm a bit confused about what is considered an input when you use the wildcard @* in an always block sensitivity list. For instance, in the following example, which signals are interpreted as inputs ...
Frank Dejay's user avatar
10 votes
2 answers
7k views

In different assembly languages MUL (x86)/MULT (mips) refer to multiplication. It is a black box for the programmer. I am interested in how actually a CPU accomplishes a multiplication regardless of ...
George's user avatar
  • 15.7k
8 votes
1 answer
3k views

I'm developing a digital logic simulator to build my own CPU in it later (so it's a long term project). Everything works great for circuits with no loops, for example a fulladder. Then there are ...
emre23's user avatar
  • 123
6 votes
1 answer
22k views

First of all, this is not a duplicate question of this because it hasn't answered my questions below. I searched for many resources and ended with no clear perception of how to perform signed number ...
user2963216's user avatar
5 votes
1 answer
17k views

Consider the following example: parameter BITWIDTH = 16; This works: logic [1:0][BITWIDTH-1:0] var = {16'h30, 16'h40}; This doesn't work: logic [1:0][BITWIDTH-1:0] var = {BITWIDTH'h30, BITWIDTH'h40}...
user3303020's user avatar
  • 1,093
5 votes
2 answers
902 views

The initial problem starts like this. There are 6 states. At each state when w=1 move to the next state, when w=0 then stay at the current state. At each state display a number using a standard 7 led ...
CMacDady's user avatar
  • 227
4 votes
2 answers
3k views

Jump's based on comparing signed integers use the Zero, Sign, and Overflow flag to determine the relationship between operands. After CMP with two signed operands, there are three possible scenario's: ...
cafekaze's user avatar
  • 377
4 votes
1 answer
933 views

I have been reading this upvoted answer on Stack Overflow: https://stackoverflow.com/a/26129960/12311164 It says that replacing wait(delay, units); in SC_THREAD to next_trigger(delay, units) in ...
user avatar
3 votes
2 answers
194 views

I am just stuck with this small logic that i am not getting it right int is 32 bits so suppose taking 20 in binary would be like // 00000000000000000000000000010100 .. now if I perform ...
Mukesh Kumar Singh's user avatar
3 votes
3 answers
14k views

Why K-map has states in sequence of 00,01,11,10 instead of 00,01,10,11?
Ashik Ghona's user avatar
3 votes
2 answers
22k views

module fronter ( arc, length, clinic ) ; input [7:0] arc; output reg [7:0] length ; input [1:0] clinic; input en0, en1, en2, en3; // 11 // clock generator is here g_cal A( en0) ; g_cal B( ...
user avatar
3 votes
2 answers
745 views

Is it possible for an I2C master device to communicate with another I2C master device ? Thanks
user3433044's user avatar
3 votes
2 answers
537 views

How do you test modules with IO input port of type Vec, Bundle, or composition of these? In other words, using PeekPokeTester, how do you properly poke() a port that is of type Vec, Bundle, or more ...
apen's user avatar
  • 712
3 votes
1 answer
8k views

As a XOR b NOR c is not equal to a NOR b XOR c,there must be some precedence rule for all operators in Boolean algebra.So what is the precedence rule for XOR,NAND,XNOR,NOR ??
Dipak Koley's user avatar
3 votes
1 answer
277 views

I am using Chisel3 to build my circuit, and I have the following test reset() private val inputData = IndexedSeq.fill(ProcedureSpaceSize)(0: BigInt) .patch(0, Seq(63: BigInt), 1) .patch(1,...
apen's user avatar
  • 712
3 votes
1 answer
351 views

For the following fragment Chisel synthesized none: import Chisel._ import Node._ import scala.collection.mutable.HashMap class PseudoLRU(val num_ways: Int) extends Module { val num_levels = ...
Alexander Samoilov's user avatar
3 votes
1 answer
918 views

I understand the way Mealy state machines work - the output logic is now a function of not just the current state but of the input directly as well. But what is the advantage to this over Moore ...
JDS's user avatar
  • 17.2k
3 votes
1 answer
489 views

Is shift adder and serial adder are same? I tried Google but I cannot understand difference. I have to use it in VHDL. Thanks
user3696958's user avatar
3 votes
1 answer
1k views

It would be nice to Vec[Mem] for say set-associative caches. Unfortunately Chisel doesn't support Vec[Mem] construct: val tag_ram2 = Vec.fill(num_ways) {Mem(new TagType(), num_sets , seqRead = ...
Alexander Samoilov's user avatar
3 votes
1 answer
7k views

Is there an existing function within the regular std.logic library to convert a boolean data type to std logic in vhdl?
Tellrell White's user avatar
2 votes
2 answers
5k views

Could someone explain to me why a latch would be inferred instead of a flip-flop? always_ff @ (posedge clk, negedge rst) begin if (!rst) a <= '0; end Shouldn't the fact that the always ...
evilpascal's user avatar
2 votes
2 answers
1k views

I'm learning verilog, and when i don't know how a circuit will work just looking in the verilog code, I go to RTL viewer to see the digital logic. But in this code a strange component appears and I ...
Guilherme Stéfano's user avatar
2 votes
2 answers
3k views

The context I read in a textbook that... An addition and subtraction cannot cause overflow. To quote, "An overflow cannot occur after an addition if one number is positive and the other negative,...
Jacky Moon's user avatar
2 votes
1 answer
12k views

i need a frequency divider in verilog, and i made the code below. It works, but i want to know if is the best solution, thanks! module frquency_divider_by2 ( clk ,clk3 ); output clk3 ; reg clk2, clk3 ...
Guilherme Stéfano's user avatar
2 votes
2 answers
13k views

Hey, I have almost no experience with Xilinx. I have a group project for a Digital Logic course that is due soon, where my partner, who was supposed to take care of the Xilinx simulations decided to ...
seventeen's user avatar
  • 1,531
2 votes
1 answer
2k views

I know the Carry flag during SUB is set whenever the minuend is smaller than the subtrahend and a borrow is required, but haven't been able to find anything explaining this in more detail. Since ...
cafekaze's user avatar
  • 377
2 votes
3 answers
507 views

I need help verifying an algebraic expression using K-Map. The expression I'm posting was actually done by my professor, but for practice purpose I wanted to use the K-Map to verify that the answer ...
miiworld2's user avatar
  • 306
2 votes
3 answers
21k views

I am trying to build a 16 bit barrel shifter with left and right shift capabilities. I am having some issues with how to structure the code so that it will do what I think I want to do. I have an ...
user3120471's user avatar
2 votes
4 answers
13k views

I've written a sketch last year that worked well at that time. But now running this code results in reversed output (when HIGH is written to a digital pin it outputs LOW and vice versa). // PROBLEM: ...
rohan.k's user avatar
  • 61
2 votes
1 answer
717 views

I'm trying to implement a structured read port to Mem: class TagType() extends Bundle() { import Consts._ val valid = Bool() val dirty = Bool() val tag = UInt(width = ADDR_MSB - ...
Alexander Samoilov's user avatar
2 votes
2 answers
605 views

The following Chisel code works as expected. class Memo extends Module { ...
dan's user avatar
  • 4,722
2 votes
1 answer
3k views

I'm currently stuck trying to understand two things related to race conditions. Issue 1: I have been presented with the following question: We consider the digital circuit and the value of its ...
methuselah's user avatar
  • 13.3k
2 votes
1 answer
749 views

I posted this digital logic diagram as an answer to another stackoverflow question. It describes a logic system which will be coded in Verilog or VHDL and eventually implemented in an FPGA. alt text ...
James Eichele's user avatar
2 votes
2 answers
16k views

In the references that we use, I usually see either a 2 or 3-input logic gate. Four-input gates come by once in a while. However, is there a certain limit to the number of inputs a logic gate can have ...
mitch08's user avatar
  • 23
2 votes
1 answer
489 views

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 ...
Alexander Samoilov's user avatar
2 votes
1 answer
3k views

I am doing a VLSI Project and I am implementing a Barrel Shifter using a tool called DSCH.The schematic for the same is realized using Transmission Gates. What the circuit does is, it ROTATES the 8 ...
user1829886's user avatar
2 votes
0 answers
901 views

I am currently working on a school project and one of my tasks is to implement a 16-bit by 16-bit 2's complement integer divider as a digital logic circuit (in other words 16-bit input divided by ...
xavieremeralds's user avatar
2 votes
1 answer
1k views

So my state diagram has seven states (000 to 110), an input B button, and four outputs P, Q, R, and S. I've made the truth table, which has 16 rows (two of which have Xs). I'm supposed to make 7 K-...
sumitz1212's user avatar
2 votes
1 answer
3k views

I have the following verilog code. Idea is to store value of counter at the time of reset. However, I am not sure if it would be synthesizable(memories need synchronous reset). I get DRC violatins and ...
user763410's user avatar
1 vote
3 answers
9k views

How can I/computer tell if binary numbers are signed or unsigned integers? Eg the binary number 1000 0001 can both be interpreted as -128, if signed, and 129, if unsigned. One advantage of using ...
user avatar
1 vote
1 answer
22k views

Can I use a wire inside an always block? Like for example: wire [3:0]a; assign a=3; always @(c) begin d=a+c; end It got compiled ...
aditya3524's user avatar
1 vote
4 answers
688 views

This question not probably not typical stackoverflow but am not sure where to ask this small question of mine. Problem: Find the number of bits in the binary representation of decimal number 16? ...
Quixotic's user avatar
  • 2,474
1 vote
1 answer
7k views

My TA solve this problem, Number of Prime Implicant (PI) for f(a,b,c,d)= Sigma m(0,2,4,5,8,10,11,13,15) is 7 and number of Essential PI (EPI) is 1. how this will be calculated? I think it's wrong. ...
user avatar
1 vote
5 answers
700 views

In my quest for getting some basics down before I start going into programming I am looking for essential knowledge about how the computer works down at the core level. I have a theory that actually ...
ThomPete's user avatar
  • 155
1 vote
3 answers
783 views

I've decided to start learning some logic design recently. I'm current at the very first unit in the book I'm using (Fundamentals of Logic Design - 5th Edition if it's of any importance) and it's ...
ManedManRicky's user avatar
1 vote
1 answer
267 views

Just reading about USART connection in AVR microcontrollers and i faced this question: What is the digital logic used in USART(RXC, TXC and other internals) of the AVR microcontrollers? I've found ...
hexpheus's user avatar
  • 771
1 vote
2 answers
3k views

I am trying to make a two dimensional array of full adders with specific logic with their inputs and outputs. I currently have two for-generate statements of rows and columns, and then an if-elsif-...
woo2's user avatar
  • 33

1
2 3 4 5