• Content Count

  • Joined

  • Last visited

About infpgaadv

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I try to learn verilog. There are a few things I don't understand about the following code(2., which is long.). I would appreciate if you help. Not: I'm a vhdl user 1-)What is the purpose of the always block used here? 2-) "assign count_next = count_reg + 1; // increase the count " how work this piece of code? Isn't it expected to grow rapidly by adding one? without stopping. How and when does count_next and count_reg get the new value? 3-)I would write something like this; // this is my code module counter (clk, reset, count); input clk, reset; output [3:0] count; reg [3:0] count; always @(posedge clk or posedge reset ) if (reset) count <= 4'b0000; else count <= count + 1'b1; endmodule ----------------------------------------------- module binaryCounter #( parameter N = 3 //N bit binary counter ) ( input wire clk, reset, output wire complete_tick, output wire[N-1:0] count ); localparam MAX_COUNT = 2**N-1; // maximum value for N-bit reg[N-1:0] count_reg; wire[N-1:0] count_next; always @(posedge clk, posedge reset) begin if (reset == 1) count_reg <= 0; // set count to 0 if reset else count_reg <= count_next; // assign next value of count end assign count_next = count_reg + 1; // increase the count // generate tick on each maximum count assign complete_tick = (count_reg == MAX_COUNT) ? 1 : 0; assign count = count_reg; // assign value to output port endmodule
  2. infpgaadv

    Advanced topics

    Thank you for all your answers. For me, it was quite satisfying. I hope it will help others.
  3. infpgaadv

    Advanced topics

    Thanks for your advice. The documents on the link are great. I've already started reading. And also thanks for the practical example.
  4. infpgaadv

    Advanced topics

    Hi, I am interested in fpga for a long time. I created beautiful projects on my own and gained quite a lot of experience. Now, I want to move them a little further and I want to learn topics like cdc, timing, speed optimizasyon,critical path, constraints etc. But, I don't know where to begin learning them and in which order should I learn? I really need advice on this. I would also be very happy if you could provide books and documents of interest these subjects.(including practical examples if possible).