SlideShare une entreprise Scribd logo
1  sur  2
RAM SOURCE CODE & TEST BENCH

--SOURCE CODE
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
USE ieee.numeric_std.ALL;

entity ram is
port (address: in std_logic_vector(7 downto 0);
            data: inout std_logic_vector(7 downto 0);
            WE, CS, OE: in std_logic);
end entity ram;

architecture simple_ram of ram is
type ram_type is array (0 to 255) of std_logic_vector(7 downto 0);
signal ram1: ram_type:= (others => (others => '0'));

begin
ram1(conv_integer(address)) <= data when ((CS='0' and WE='0') and OE='1');
data <= ram1(conv_integer(address)) when ((CS='0' and WE='1') and OE='0') else
(others=>'Z');
end simple_ram;

--TEST BENCH

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--USE ieee.numeric_std.ALL;

ENTITY Ram_TB IS
END Ram_TB;

ARCHITECTURE behavior OF Ram_TB IS

    -- Component Declaration for the Unit Under Test (UUT)

    COMPONENT ram
    PORT(
          address : IN std_logic_vector(7 downto 0);
          data : INOUT std_logic_vector(7 downto 0);
          WE : IN std_logic;
          CS : IN std_logic;
          OE : IN std_logic
        );
    END COMPONENT;


   --Inputs
   signal address : std_logic_vector(7 downto 0) := (others => '0');
   signal WE : std_logic := '0';
   signal CS : std_logic := '0';
   signal OE : std_logic := '0';

      --Outputs
   signal data : std_logic_vector(7 downto 0);
   -- No clocks detected in port list. Replace <clock> below
----with
   -- appropriate port name
BEGIN

      -- Instantiate the Unit Under Test (UUT)
   uut: ram PORT MAP (
           address => address,
           data => data,
           WE => WE,
           CS => CS,
           OE => OE
        );

   -- Clock process definitions




   stim_proc: process
   begin
      -- hold reset state for 100 ns.
            WE<= '0';
         OE<= '1';
            Address<="00000001";
      Data<=   "00000001";wait for 10 ns;
            Address<="00000010";
            Data<=    "00000010";wait for 10   ns;
            Address<="00000100";
            Data<=    "00000100";wait for 10   ns;
            Address<="00001000";
            Data<=    "00001000";wait for 10   ns;
            Address<="00010000";
            Data<=    "00010000";wait for 10   ns;
            Address<="00100000";
            Data<=    "00100000";wait for 10   ns;
            Address<="01000000";
            Data<=    "01000000";wait for 10   ns;
            Address<="10000000";
            Data<=    "10000000";wait for 10   ns;
            WE<= '1';
         OE<= '0';
            Data<=    "ZZZZZZZZ";
            Address<="00000001";wait for 10    ns;
            Address<="00000010";wait for 10    ns;
            Address<="00000100";wait for 10    ns;
            Address<="00001000";wait for 10    ns;
            Address<="00010000";wait for 10    ns;
            Address<="00100000";wait for 10    ns;
            Address<="01000000";wait for 10    ns;
            Address<="10000000";wait for 10    ns;
            Address<="00000000";wait for 10    ns;
  end process;

END;

Contenu connexe

Tendances

8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)Ravi Anand
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum modeSridari Iyer
 
10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction setShivam Singhal
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / CountersPatricio Lima
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paperprathik
 
Pin digram of 8086
Pin digram of 8086Pin digram of 8086
Pin digram of 8086RJ
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?Sameh El-Ashry
 
Mobile communication
Mobile communicationMobile communication
Mobile communicationJagjit Wilku
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modesVijay Kumar
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollerchirag patil
 
8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED CAman Sharma
 
Operation of 8255A
Operation of 8255AOperation of 8255A
Operation of 8255AAnuj Yadav
 

Tendances (20)

Meley & moore
Meley & mooreMeley & moore
Meley & moore
 
8255 Programmable parallel I/O
8255 Programmable parallel I/O 8255 Programmable parallel I/O
8255 Programmable parallel I/O
 
8085 instruction set (detailed)
8085 instruction set (detailed)8085 instruction set (detailed)
8085 instruction set (detailed)
 
8086 in minimum mode
8086 in minimum mode8086 in minimum mode
8086 in minimum mode
 
10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction set
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / Counters
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
denme
denmedenme
denme
 
Microcontrollers 80 Marks Sample Question Paper
Microcontrollers   80 Marks Sample Question PaperMicrocontrollers   80 Marks Sample Question Paper
Microcontrollers 80 Marks Sample Question Paper
 
Pin digram of 8086
Pin digram of 8086Pin digram of 8086
Pin digram of 8086
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?
 
Mobile communication
Mobile communicationMobile communication
Mobile communication
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modes
 
Port Security
Port SecurityPort Security
Port Security
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
8259 a
8259 a8259 a
8259 a
 
Lcd
LcdLcd
Lcd
 
8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C8051 programming skills using EMBEDDED C
8051 programming skills using EMBEDDED C
 
Operation of 8255A
Operation of 8255AOperation of 8255A
Operation of 8255A
 
Can bus
Can busCan bus
Can bus
 

En vedette

301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilogSrinivas Naidu
 
Ram sourcecode&testbench
Ram sourcecode&testbenchRam sourcecode&testbench
Ram sourcecode&testbenchRaj Mohan
 
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsAmal Khailtash
 
见微知著——无线产品交互细节
见微知著——无线产品交互细节见微知著——无线产品交互细节
见微知著——无线产品交互细节elya
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection NetworkAli A Jalil
 
TIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIES
TIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIESTIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIES
TIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIESRanjan Mohanta
 
Avaya cc control manager 6.2 brochure
Avaya cc control manager 6.2   brochureAvaya cc control manager 6.2   brochure
Avaya cc control manager 6.2 brochureraulhmata
 
Yliko pake geniko_meros_201105.20-27
Yliko pake geniko_meros_201105.20-27Yliko pake geniko_meros_201105.20-27
Yliko pake geniko_meros_201105.20-27Nikos Kaklamanos
 
Sahar Saqib - Transcript of Oral Presentation
Sahar Saqib - Transcript of Oral PresentationSahar Saqib - Transcript of Oral Presentation
Sahar Saqib - Transcript of Oral Presentationsaharsaqib
 
Hacking your Kindle (OSCON Lightning Talk)
Hacking your Kindle (OSCON Lightning Talk)Hacking your Kindle (OSCON Lightning Talk)
Hacking your Kindle (OSCON Lightning Talk)Jesse Vincent
 
Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Raffi Krikorian
 
IBM Big Data References
IBM Big Data ReferencesIBM Big Data References
IBM Big Data ReferencesRob Thomas
 
Text 4 superlatives ok
Text 4 superlatives okText 4 superlatives ok
Text 4 superlatives okIES EUROPA
 
Ikp'ko;b0yp
Ikp'ko;b0ypIkp'ko;b0yp
Ikp'ko;b0ypnoylove
 

En vedette (20)

301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog
 
Ram sourcecode&testbench
Ram sourcecode&testbenchRam sourcecode&testbench
Ram sourcecode&testbench
 
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
 
见微知著——无线产品交互细节
见微知著——无线产品交互细节见微知著——无线产品交互细节
见微知著——无线产品交互细节
 
Vhdl programming
Vhdl programmingVhdl programming
Vhdl programming
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection Network
 
Programs of VHDL
Programs of VHDLPrograms of VHDL
Programs of VHDL
 
TIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIES
TIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIESTIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIES
TIPS ON SCIENTIFIC WRITING & EDITING METHODOLOGIES
 
Rescue.asd
Rescue.asdRescue.asd
Rescue.asd
 
Avaya cc control manager 6.2 brochure
Avaya cc control manager 6.2   brochureAvaya cc control manager 6.2   brochure
Avaya cc control manager 6.2 brochure
 
Yliko pake geniko_meros_201105.20-27
Yliko pake geniko_meros_201105.20-27Yliko pake geniko_meros_201105.20-27
Yliko pake geniko_meros_201105.20-27
 
Sahar Saqib - Transcript of Oral Presentation
Sahar Saqib - Transcript of Oral PresentationSahar Saqib - Transcript of Oral Presentation
Sahar Saqib - Transcript of Oral Presentation
 
Hacking your Kindle (OSCON Lightning Talk)
Hacking your Kindle (OSCON Lightning Talk)Hacking your Kindle (OSCON Lightning Talk)
Hacking your Kindle (OSCON Lightning Talk)
 
Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)
 
IBM Big Data References
IBM Big Data ReferencesIBM Big Data References
IBM Big Data References
 
Kaypp
KayppKaypp
Kaypp
 
Text 4 superlatives ok
Text 4 superlatives okText 4 superlatives ok
Text 4 superlatives ok
 
CIF ppt 21.12.12
CIF ppt 21.12.12CIF ppt 21.12.12
CIF ppt 21.12.12
 
No tlp Polisi
No tlp PolisiNo tlp Polisi
No tlp Polisi
 
Ikp'ko;b0yp
Ikp'ko;b0ypIkp'ko;b0yp
Ikp'ko;b0yp
 

Similaire à RAM Source code and Test Bench

I am try to create a program that takes a user typed MIPS instructio.pdf
I am try to create a program that takes a user typed MIPS instructio.pdfI am try to create a program that takes a user typed MIPS instructio.pdf
I am try to create a program that takes a user typed MIPS instructio.pdfallystraders
 
Ns client++ whats new (nwc2013)
Ns client++ whats new (nwc2013)Ns client++ whats new (nwc2013)
Ns client++ whats new (nwc2013)Michael Medin
 
Nagios Conference 2013 - Michael Medin - NSClient++ Whats New
Nagios Conference 2013 - Michael Medin - NSClient++ Whats NewNagios Conference 2013 - Michael Medin - NSClient++ Whats New
Nagios Conference 2013 - Michael Medin - NSClient++ Whats NewNagios
 

Similaire à RAM Source code and Test Bench (6)

m4_VHDL_ED.pdf
m4_VHDL_ED.pdfm4_VHDL_ED.pdf
m4_VHDL_ED.pdf
 
I am try to create a program that takes a user typed MIPS instructio.pdf
I am try to create a program that takes a user typed MIPS instructio.pdfI am try to create a program that takes a user typed MIPS instructio.pdf
I am try to create a program that takes a user typed MIPS instructio.pdf
 
Adventure time
Adventure timeAdventure time
Adventure time
 
Reporte vhd10
Reporte vhd10Reporte vhd10
Reporte vhd10
 
Ns client++ whats new (nwc2013)
Ns client++ whats new (nwc2013)Ns client++ whats new (nwc2013)
Ns client++ whats new (nwc2013)
 
Nagios Conference 2013 - Michael Medin - NSClient++ Whats New
Nagios Conference 2013 - Michael Medin - NSClient++ Whats NewNagios Conference 2013 - Michael Medin - NSClient++ Whats New
Nagios Conference 2013 - Michael Medin - NSClient++ Whats New
 

Dernier

➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...amitlee9823
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdftbatkhuu1
 
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Availabledollysharma2066
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...RitikaRoy32
 
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...nirzagarg
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experiencedWhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experiencedNitya salvi
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation decktbatkhuu1
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Call Girls in Nagpur High Profile
 
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...Call Girls in Nagpur High Profile
 
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...SUHANI PANDEY
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...kumaririma588
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...amitlee9823
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Top Rated Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxTusharBahuguna2
 
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...nirzagarg
 

Dernier (20)

➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men  🔝jhansi🔝   Escorts S...
➥🔝 7737669865 🔝▻ jhansi Call-girls in Women Seeking Men 🔝jhansi🔝 Escorts S...
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard  ...
Anamika Escorts Service Darbhanga ❣️ 7014168258 ❣️ High Cost Unlimited Hard ...
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
 
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experiencedWhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 105, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
 
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Top Rated Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Saswad ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptx
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
 
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
 

RAM Source code and Test Bench

  • 1. RAM SOURCE CODE & TEST BENCH --SOURCE CODE library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; USE ieee.numeric_std.ALL; entity ram is port (address: in std_logic_vector(7 downto 0); data: inout std_logic_vector(7 downto 0); WE, CS, OE: in std_logic); end entity ram; architecture simple_ram of ram is type ram_type is array (0 to 255) of std_logic_vector(7 downto 0); signal ram1: ram_type:= (others => (others => '0')); begin ram1(conv_integer(address)) <= data when ((CS='0' and WE='0') and OE='1'); data <= ram1(conv_integer(address)) when ((CS='0' and WE='1') and OE='0') else (others=>'Z'); end simple_ram; --TEST BENCH LIBRARY ieee; USE ieee.std_logic_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --USE ieee.numeric_std.ALL; ENTITY Ram_TB IS END Ram_TB; ARCHITECTURE behavior OF Ram_TB IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT ram PORT( address : IN std_logic_vector(7 downto 0); data : INOUT std_logic_vector(7 downto 0); WE : IN std_logic; CS : IN std_logic; OE : IN std_logic ); END COMPONENT; --Inputs signal address : std_logic_vector(7 downto 0) := (others => '0'); signal WE : std_logic := '0'; signal CS : std_logic := '0'; signal OE : std_logic := '0'; --Outputs signal data : std_logic_vector(7 downto 0); -- No clocks detected in port list. Replace <clock> below ----with -- appropriate port name
  • 2. BEGIN -- Instantiate the Unit Under Test (UUT) uut: ram PORT MAP ( address => address, data => data, WE => WE, CS => CS, OE => OE ); -- Clock process definitions stim_proc: process begin -- hold reset state for 100 ns. WE<= '0'; OE<= '1'; Address<="00000001"; Data<= "00000001";wait for 10 ns; Address<="00000010"; Data<= "00000010";wait for 10 ns; Address<="00000100"; Data<= "00000100";wait for 10 ns; Address<="00001000"; Data<= "00001000";wait for 10 ns; Address<="00010000"; Data<= "00010000";wait for 10 ns; Address<="00100000"; Data<= "00100000";wait for 10 ns; Address<="01000000"; Data<= "01000000";wait for 10 ns; Address<="10000000"; Data<= "10000000";wait for 10 ns; WE<= '1'; OE<= '0'; Data<= "ZZZZZZZZ"; Address<="00000001";wait for 10 ns; Address<="00000010";wait for 10 ns; Address<="00000100";wait for 10 ns; Address<="00001000";wait for 10 ns; Address<="00010000";wait for 10 ns; Address<="00100000";wait for 10 ns; Address<="01000000";wait for 10 ns; Address<="10000000";wait for 10 ns; Address<="00000000";wait for 10 ns; end process; END;