Showing posts with label Y-chart. Show all posts
Showing posts with label Y-chart. Show all posts

October 1, 2023

Step-by-step guide on how to design and implement Counters with testbench code on Xilinx Vivado design tool.

 In this project we will see how to implement all Counters with testbench code on Xilinx Vivado design tool. 

Step 1: Click on New Project -> Next

Step 2: Enter Project Name and Select appropriate Project Location -> Next

Step 3: Select RTL Project -> Next

Step 4: Click on Create File and create file with file name up_counter -> Next

Step 5: We will not add the Constraint file So click on Next

Step 6: For Default Part click on Next as we are not using any development Board

Step 7: Check the New Project Summary and click on Finish.

Step 8: Now you will be prompted with the Define module page but we will create the complete code from scratch so click on cancel and Yes

Step 9: Now on the Home Page click on Sources -> Design Sources -> Non-module Files

Step 10: Enter the below codes in the “up_counter.vhd” files.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity up_counter is
Port ( clk: in std_logic;
reset: in std_logic;
counter: out std_logic_vector(3 downto 0)
);
end up_counter;

architecture Behavioral of up_counter is
signal count: std_logic_vector(3 downto 0);
begin
process(clk)
begin
if(rising_edge(clk)) then
if(reset=’1') then
count <= x”0";
else
count <= count + x”1";
end if;
end if;
end process;
counter <= count;

end Behavioral;

Step 11: Now to write the testbench code for and gate right click on Design Sources -> Add Sources -> Add or create design sources -> Create File -> Add File name as tb_up_counter -> Finish -> Ok -> Yes

Step 12: Now open the testbench file and enter the below testbench code

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity tb_up_counters is
end tb_up_counters;

architecture Behavioral of tb_up_counters is

component up_counter
Port ( clk: in std_logic; — clock input
reset: in std_logic; — reset input
counter: out std_logic_vector(3 downto 0) — output 4-bit counter
);
end component;
signal reset,clk: std_logic;
signal counter:std_logic_vector(3 downto 0);

begin
dut: up_counter port map (clk => clk, reset=>reset, counter => counter);
— Clock process definitions
clock_process :process
begin
clk <= ‘0’;
wait for 10 ns;
clk <= ‘1’;
wait for 10 ns;
end process;

— Stimulus process
stim_proc: process
begin
— hold reset state for 100 ns.
reset <= ‘1’;
wait for 20 ns;
reset <= ‘0’;
wait;
end process;
end Behavioral;

Here, in testbench code we do not define values in entity hence we have kept it empty. Then in architecture we have copied the components of up_counter and defined signals for connecting the ports of counter. Inside the process statement we write all test cases and define the respective delays.

Step 13: Now as we have written all the codes let’s launch the simulation. Enter launch_simulation in the Tcl Console and press Enter.

We have successfully implemented up counter with testbench code. Click on Zoom Fit to see the output waveform more clearly and verify the outputs.

If you want to implement other counters the process would be same except the VHDL codes. Visit below links to see how to implement other Counters:

1] Down Counter
2] Up Down Counter

In this way, we can implement Counters using testbench codes.

Like, Share, and Follow me if you like my content.
Thank You

March 28, 2023

The Role of Y Chart and Gajski Kuhn Chart in Understanding VLSI Design Flow.

  • Very large scale integration (VLSI) is the process of creating an integrated circuit (IC) by combining thousands of transistors into a single chip. The design of a VLSI circuit follows a well-defined flow, starting from design specifications and ending at the fabrication and packaging of the chip.
  • The VLSI design process consists of a series of steps that ensure the functionality and manufacturability of the chip.
  • The below diagram shows the Design Flow in VLSI.
    1. Behavioural Domain: This is the starting point where the functionality of the chip is defined. It describes "what" the chip should do by specifying algorithms that define system behavior. In this stage, engineers focus on writing the high-level specifications that outline the intended operation of the IC.
    2. Structural Domain: Once the behavior is defined, the design moves into the structural domain. Here, the focus shifts to defining "how" the system will be built. The system is broken down into smaller modules and system components, such as logic gates, flip-flops, and registers. The structural domain is responsible for transforming the abstract behaviors into concrete components.
    3. Physical Domain: The final domain, the physical domain, deals with the physical realization of the chip. In this domain, the design is mapped onto silicon through processes like floorplanning, placement, and routing. Floorplanning algorithms determine where the various components should be placed on the chip, ensuring that the design adheres to timing constraints and power requirements.
    • Y Chart or Gajski-Kuhn Chart is simply a pictorial representation of these three Domains in VLSI for better understanding the complete Design Flow.
    • Below Diagram shows Y-Chart or Gajski-Kuhn Chart.
    • When we begin designing a VLSI circuit, the process starts with defining certain specifications. Based on these specifications, we formulate algorithms in the Behavioral Domain, which outline the intended functionality of the system. These algorithms are then passed on to the Structural Domain, where the system’s behavior is mapped onto specific hardware components. At this stage, system assignments are made, defining which logic gates, registers, and interconnects will execute the desired functions.

      After defining the system’s structure, we move to the Physical Domain, where a chip floor plan is created using various floorplanning algorithms. The goal is to ensure an optimized physical layout that meets performance requirements such as power and area constraints.

      Once the structure is physically mapped out, timing analysis is conducted to ensure that the design meets its timing constraints. This step, often involving tools like static timing analysis (STA), verifies the signal propagation times between components and registers defined in the Structural Domain. The system’s functionality over time, including clock cycles, is validated in this process.

      Following this, module placement occurs in the Physical Domain, ensuring that components are aligned with the timing requirements determined during the timing analysis phase. The Behavioral Domain provides the high-level description of how the logic gates should operate, but the exact gate-level logic is synthesized in the Structural Domain and mapped during placement.

      Considering the current-handling capabilities of different logic gates, we proceed to the cell placement stage, ensuring that logic blocks are positioned efficiently in the Physical Domain. The Boolean equations governing the behavior of the logic blocks are defined earlier in the synthesis phase (in the Structural Domain) and are then implemented using transistors, the fundamental building blocks of the design.

      After verifying the circuit’s performance through simulation and validation, we move on to masking, the final stage. Here, physical connections are established between the logic blocks, enabling the design to function as a unified system, ready for fabrication.

    Like, Share, and Follow me if you like my content.
    Thank You

Explore Our Topics!

Check out the extensive list of topics we discuss:  Communication Protocols: -  USB   - RS232   -  Ethernet   -  AMBA Protocol: APB, AHB and...