Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

wired- or/and functions in vhdl

Status
Not open for further replies.

rajakash

Member level 2
Joined
Nov 9, 2006
Messages
53
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,608
wired-ro/and in vhdl

hi,

y<=a and b;
y<=a or b;

how to do wired or/ and for this function. is there any syntax in VHDL like wor in verilog?

plz help me.
 

Re: wired-ro/and in vhdl

The signal should be declared of type 'resolve_logic'.

signal y: resolve_logic;


This should solve a wired-or.

Added after 6 minutes:



This could be how to imply a wired-and

Code:
type logic_level is (L, Z, H);
   type logic_array is array (integer range <>) of logic_level;
   function resolve_logic (drivers : in logic_array) return logic_level;
   subtype resolved_level is resolve_logic logic_level;

   function resolve_logic (drivers : in logic_array) return logic_level;
   begin
      for index in drivers'range loop
         if drivers(index) = L then
            return L;  --if any value is L then return L (makes this a wired and)
         end if;
      end loop;
      return H;
   end resolve_logic;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top