SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Two voltage (channel 1 and 2) and two current (channel 1 and 2) sensors indicate measured
voltage with 16-bit binary values on their output lines, S15 to S0 .
1. Instantaneous power is a product of voltage and current. Write the behavioral VHDL code to
analyze the power in each channel (1 and 2) and display in 4-bit binary values issuing a 1-bit
address P .
Solution
entity power is
begin
port(V1,V2,I1,I2:in std_logic_vector(15 downto 0); P1,P2: out std_logic_vector(3 downto 0));
end entity;
architecture arc_power of power is
signal P1_temp,P2_temp: std_logic_vector(15 downto 0);
signal pt1,pt2,pt3,pt4,p1,p2,p3,p4: bit;
begin
P1_temp<=V1 and I1;
P2_temp<=V2 and I2;
pt1<=P1_temp[3] or P1_temp[2] or P1_temp[1] or P1_temp[0];
pt2<=P1_temp[7] or P1_temp[6] or P1_temp[5] or P1_temp[4];
pt3<=P1_temp[11] or P1_temp[10] or P1_temp[9] or P1_temp[8];
pt4<=P1_temp[15] or P1_temp[14] or P1_temp[13] or P1_temp[12];
P1<=pt4&pt3&pt2&pt1;
p1<=P2_temp[3] or P2_temp[2] or P2_temp[1] or P2_temp[0];
p2<=P2_temp[7] or P2_temp[6] or P2_temp[5] or P2_temp[4];
p3<=P2_temp[11] or P2_temp[10] or P2_temp[9] or P2_temp[8];
p4<=P2_temp[15] or P2_temp[14] or P2_temp[13] or P2_temp[12];
P2<=p4&p3&p2&p1;
end architecture;

Weitere ähnliche Inhalte

Ähnlich wie Two voltage (channel 1 and 2) and two current (channel 1 and 2) sensor.docx

adcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptxadcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptx
shivraj3252
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
DIPAN GHOSH
 

Ähnlich wie Two voltage (channel 1 and 2) and two current (channel 1 and 2) sensor.docx (20)

Basic_Digital_Circuits_Implementation_using_Virtuoso.pdf
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdfBasic_Digital_Circuits_Implementation_using_Virtuoso.pdf
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdf
 
adcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptxadcanddac hai kya bhayy me know if-01.pptx
adcanddac hai kya bhayy me know if-01.pptx
 
Power Quality Indices for Electrical Power Systems under Non-Stationary Distu...
Power Quality Indices for Electrical Power Systems under Non-Stationary Distu...Power Quality Indices for Electrical Power Systems under Non-Stationary Distu...
Power Quality Indices for Electrical Power Systems under Non-Stationary Distu...
 
Or gate
Or gateOr gate
Or gate
 
Rf controlled pick up and drop robot
Rf controlled pick up and drop robotRf controlled pick up and drop robot
Rf controlled pick up and drop robot
 
8051 FINIAL
8051 FINIAL8051 FINIAL
8051 FINIAL
 
Sajib 201-15-3773-encoder
Sajib 201-15-3773-encoderSajib 201-15-3773-encoder
Sajib 201-15-3773-encoder
 
Microcontroller based electronic oad controller.pptx
Microcontroller based electronic oad controller.pptxMicrocontroller based electronic oad controller.pptx
Microcontroller based electronic oad controller.pptx
 
I o ports.ppt
I o ports.pptI o ports.ppt
I o ports.ppt
 
m.tech esd lab manual for record
m.tech esd lab manual for recordm.tech esd lab manual for record
m.tech esd lab manual for record
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17
 
interfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfinterfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdf
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
 
Two port network
Two port networkTwo port network
Two port network
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
 
Decoders
DecodersDecoders
Decoders
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)
 
WIRELESS GESTURED CONTROLLED ROBOT USING ACCELEROMETER
WIRELESS GESTURED CONTROLLED ROBOT USING ACCELEROMETERWIRELESS GESTURED CONTROLLED ROBOT USING ACCELEROMETER
WIRELESS GESTURED CONTROLLED ROBOT USING ACCELEROMETER
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
Keypad interfacing 8051 -NANOCDAC
Keypad interfacing 8051 -NANOCDACKeypad interfacing 8051 -NANOCDAC
Keypad interfacing 8051 -NANOCDAC
 

Mehr von kevin792

Unit 5- Discussion - Technology Ethics The textbook- --Technology in A.docx
Unit 5- Discussion - Technology Ethics The textbook- --Technology in A.docxUnit 5- Discussion - Technology Ethics The textbook- --Technology in A.docx
Unit 5- Discussion - Technology Ethics The textbook- --Technology in A.docx
kevin792
 
Two parallel plates are seperated by a distance 2H- The plates are mov.docx
Two parallel plates are seperated by a distance 2H- The plates are mov.docxTwo parallel plates are seperated by a distance 2H- The plates are mov.docx
Two parallel plates are seperated by a distance 2H- The plates are mov.docx
kevin792
 
Two KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docx
Two KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docxTwo KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docx
Two KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docx
kevin792
 
Question Five- State the advantages and a major limitation of each of.docx
Question Five- State the advantages and a major limitation of each of.docxQuestion Five- State the advantages and a major limitation of each of.docx
Question Five- State the advantages and a major limitation of each of.docx
kevin792
 

Mehr von kevin792 (20)

Two types of closing journal entries are posted to retained earnings a.docx
Two types of closing journal entries are posted to retained earnings a.docxTwo types of closing journal entries are posted to retained earnings a.docx
Two types of closing journal entries are posted to retained earnings a.docx
 
Unit 5- Discussion - Technology Ethics The textbook- --Technology in A.docx
Unit 5- Discussion - Technology Ethics The textbook- --Technology in A.docxUnit 5- Discussion - Technology Ethics The textbook- --Technology in A.docx
Unit 5- Discussion - Technology Ethics The textbook- --Technology in A.docx
 
Two parallel plates are seperated by a distance 2H- The plates are mov.docx
Two parallel plates are seperated by a distance 2H- The plates are mov.docxTwo parallel plates are seperated by a distance 2H- The plates are mov.docx
Two parallel plates are seperated by a distance 2H- The plates are mov.docx
 
ult View History Bookmarks Window Help wps-prenhall-com Problem Solvin.docx
ult View History Bookmarks Window Help wps-prenhall-com Problem Solvin.docxult View History Bookmarks Window Help wps-prenhall-com Problem Solvin.docx
ult View History Bookmarks Window Help wps-prenhall-com Problem Solvin.docx
 
uestion 5 Krispy Kreme Donuts has a leverage of 2-5 What does this mea.docx
uestion 5 Krispy Kreme Donuts has a leverage of 2-5 What does this mea.docxuestion 5 Krispy Kreme Donuts has a leverage of 2-5 What does this mea.docx
uestion 5 Krispy Kreme Donuts has a leverage of 2-5 What does this mea.docx
 
Two sound sources- I and 2- are emitting spherical waves in air- The f.docx
Two sound sources- I and 2- are emitting spherical waves in air- The f.docxTwo sound sources- I and 2- are emitting spherical waves in air- The f.docx
Two sound sources- I and 2- are emitting spherical waves in air- The f.docx
 
Type of financial crisis Type of financial crisisSolutionThere are m.docx
Type of financial crisis   Type of financial crisisSolutionThere are m.docxType of financial crisis   Type of financial crisisSolutionThere are m.docx
Type of financial crisis Type of financial crisisSolutionThere are m.docx
 
Typing Answer is Mandatory! Explain the difference between cyclic hydr.docx
Typing Answer is Mandatory! Explain the difference between cyclic hydr.docxTyping Answer is Mandatory! Explain the difference between cyclic hydr.docx
Typing Answer is Mandatory! Explain the difference between cyclic hydr.docx
 
type of accountsSolutionSolution- 1- All of the three are types of Acc.docx
type of accountsSolutionSolution- 1- All of the three are types of Acc.docxtype of accountsSolutionSolution- 1- All of the three are types of Acc.docx
type of accountsSolutionSolution- 1- All of the three are types of Acc.docx
 
Two KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docx
Two KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docxTwo KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docx
Two KPMG auditors- Kevin Hall and Rosemary Meyer- were accused of impr.docx
 
Question 28 (3 points) A student performs a titration procedure by add.docx
Question 28 (3 points) A student performs a titration procedure by add.docxQuestion 28 (3 points) A student performs a titration procedure by add.docx
Question 28 (3 points) A student performs a titration procedure by add.docx
 
Question 26 The stock of Kenny Corp- is owned equally by two brothers-.docx
Question 26 The stock of Kenny Corp- is owned equally by two brothers-.docxQuestion 26 The stock of Kenny Corp- is owned equally by two brothers-.docx
Question 26 The stock of Kenny Corp- is owned equally by two brothers-.docx
 
Question 2 Which of the following would be a cash flow from financing.docx
Question 2 Which of the following would be a cash flow from financing.docxQuestion 2 Which of the following would be a cash flow from financing.docx
Question 2 Which of the following would be a cash flow from financing.docx
 
Question 2 1- Which of the following is not a way managers generally b.docx
Question 2 1- Which of the following is not a way managers generally b.docxQuestion 2 1- Which of the following is not a way managers generally b.docx
Question 2 1- Which of the following is not a way managers generally b.docx
 
Question 19 of 20 5 0 Points A important part of weather science is --.docx
Question 19 of 20 5 0 Points A important part of weather science is --.docxQuestion 19 of 20 5 0 Points A important part of weather science is --.docx
Question 19 of 20 5 0 Points A important part of weather science is --.docx
 
Question on Exponential and Logarithmic functions Banking The compound.docx
Question on Exponential and Logarithmic functions Banking The compound.docxQuestion on Exponential and Logarithmic functions Banking The compound.docx
Question on Exponential and Logarithmic functions Banking The compound.docx
 
Question Five- State the advantages and a major limitation of each of.docx
Question Five- State the advantages and a major limitation of each of.docxQuestion Five- State the advantages and a major limitation of each of.docx
Question Five- State the advantages and a major limitation of each of.docx
 
Question 11- (1 points) (#50 from textbook) The January 2- 2011 eart (1).docx
Question 11- (1 points)  (#50 from textbook)  The January 2- 2011 eart (1).docxQuestion 11- (1 points)  (#50 from textbook)  The January 2- 2011 eart (1).docx
Question 11- (1 points) (#50 from textbook) The January 2- 2011 eart (1).docx
 
Question Part Points Submissions Used Solution.docx
Question Part     Points     Submissions Used   Solution.docxQuestion Part     Points     Submissions Used   Solution.docx
Question Part Points Submissions Used Solution.docx
 
Question 11- (1 points) (#50 from textbook) The January 2- 2011 eart.docx
Question 11- (1 points)  (#50 from textbook)  The January 2- 2011 eart.docxQuestion 11- (1 points)  (#50 from textbook)  The January 2- 2011 eart.docx
Question 11- (1 points) (#50 from textbook) The January 2- 2011 eart.docx
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 

Two voltage (channel 1 and 2) and two current (channel 1 and 2) sensor.docx

  • 1. Two voltage (channel 1 and 2) and two current (channel 1 and 2) sensors indicate measured voltage with 16-bit binary values on their output lines, S15 to S0 . 1. Instantaneous power is a product of voltage and current. Write the behavioral VHDL code to analyze the power in each channel (1 and 2) and display in 4-bit binary values issuing a 1-bit address P . Solution entity power is begin port(V1,V2,I1,I2:in std_logic_vector(15 downto 0); P1,P2: out std_logic_vector(3 downto 0)); end entity; architecture arc_power of power is signal P1_temp,P2_temp: std_logic_vector(15 downto 0); signal pt1,pt2,pt3,pt4,p1,p2,p3,p4: bit; begin P1_temp<=V1 and I1; P2_temp<=V2 and I2; pt1<=P1_temp[3] or P1_temp[2] or P1_temp[1] or P1_temp[0]; pt2<=P1_temp[7] or P1_temp[6] or P1_temp[5] or P1_temp[4]; pt3<=P1_temp[11] or P1_temp[10] or P1_temp[9] or P1_temp[8]; pt4<=P1_temp[15] or P1_temp[14] or P1_temp[13] or P1_temp[12];
  • 2. P1<=pt4&pt3&pt2&pt1; p1<=P2_temp[3] or P2_temp[2] or P2_temp[1] or P2_temp[0]; p2<=P2_temp[7] or P2_temp[6] or P2_temp[5] or P2_temp[4]; p3<=P2_temp[11] or P2_temp[10] or P2_temp[9] or P2_temp[8]; p4<=P2_temp[15] or P2_temp[14] or P2_temp[13] or P2_temp[12]; P2<=p4&p3&p2&p1; end architecture;