Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Learning Aids/Tools 2 years ago
Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; use ieee.numeric_std.all;
-- entity part contain R for output of Register
entity register_16 is port( input: in std_logic_vector(15 downto 0); ld, inc, clk, clr: in std_logic; R: buffer std_logic_vector(15 downto 0)); end register_16 ;
-- it have to parallel process
architecture behavioral of register_16 is begin reg: process (input, ld, clk, clr) variable R_temp : std_logic_vector(15 downto 0); begin if (clr='1') then R_temp := b"0000000000000000"; elsif (clk'event and clk='1') then if (ld='1') then R_temp := input; end if; end if; R <= R_temp; end process reg;
--my error in this step
inc_R: process (inc) begin R <= R+'1'; end process inc_R; end behavioral ;
--main process (reg) work correctly --but other process have error by adding 1.
Sorry to say, but there are quite a lot of things wrong with your code...
R <= R + 1;
By your code, I gather that you are trying to write a counter with increment, load and clear signals. I don't just want to give you the code (that would ruin the learning experience for you), but try to fit the entire counter into a single process, using the following template:
process(clk) begin if(rising_edge(clk)) then -- Your code here vvv if(clr = '1') then elsif(ld = '1') then elsif(inc = '1') then end if; -- Your code here ^^^ end if; end process;
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.