A level-to-pulse converter produces a single cycle pulse each time its input goes high. It’s a synchronous rising-edge detector. Sample uses:– Buttons and switches pressed by humans for arbitrary periods of time – Single-cycle enable signals for counters.

Type[1] >> This is the moore fsm for the level to pulse design.State transition diagram is a useful FSM representation and Transition diagram is readily converted to a state transition table (just a truth table).

Combinational logic may be derived using Karnaugh maps

Moore FSM circuit implementation of level-to-pulse converter:


code is given below for moore fsm
library IEEE;
use IEEE.std_logic_1164.all;
entity moore_LTP_fsm1 is
port (
clk: in STD_LOGIC;
L: in STD_LOGIC;
rst: in STD_LOGIC;
P: out STD_LOGIC);
end moore_LTP_fsm1;
architecture moore_LTP_fsm1_arch of moore_LTP_fsm1 is
-- SYMBOLIC ENCODED state machine: Sreg0
type Sreg0_type is (
S1, S2, S3
);
-- attribute enum_encoding of Sreg0_type: type is ... -- enum_encoding attribute is not supported for symbolic encoding
signal Sreg0, NextState_Sreg0: Sreg0_type;
-- Declarations of pre-registered internal signals
signal int_P, next_P: STD_LOGIC;
begin
-- concurrent signals assignments
-- Diagram ACTION
----------------------------------------------------------------------
-- Machine: Sreg0
----------------------------------------------------------------------
------------------------------------
-- Next State Logic (combinatorial)
------------------------------------
Sreg0_NextState: process (int_P, L, Sreg0)
begin
NextState_Sreg0 <= Sreg0;
-- Set default values for outputs and signals
next_P <= int_P;
case Sreg0 is
when S1 =>
next_P <= '0';
if L='1' then
NextState_Sreg0 <= S2;
elsif L='0' then
NextState_Sreg0 <= S1;
end if;
when S2 =>
next_P <= '1';
if L='0' then
NextState_Sreg0 <= S1;
elsif L='1' then
NextState_Sreg0 <= S3;
end if;
when S3 =>
next_P <= '0';
if L='0' then
NextState_Sreg0 <= S1;
elsif L='1' then
NextState_Sreg0 <= S3;
end if;
--vhdl_cover_off
when others =>
null;
--vhdl_cover_on
end case;
end process;
------------------------------------
-- Current State Logic (sequential)
------------------------------------
Sreg0_CurrentState: process (clk)
begin
if clk'event and clk = '1' then
if rst='1' then
Sreg0 <= S1;
else
Sreg0 <= NextState_Sreg0;
end if;
end if;
end process;
------------------------------------
-- Registered Outputs Logic
------------------------------------
Sreg0_RegOutput: process (clk)
begin
if clk'event and clk = '1' then
if rst='1' then
int_P <= '0';
else
int_P <= next_P;
end if;
end if;
end process;
-- Copy temporary signals to target output ports
P <= int_P;
end moore_LTP_fsm1_arch;

Moore circuit with its waveform.

Type [2]>>Design of a Mealy Level-to-Pulse. Since outputs are determined by state and inputs, Mealy FSMs may need fewer states than Moore FSM implementations.

Its state transition table.

FSM’s state simply remembers the previous value of L • Circuit benefits from the Mealy FSM’s implicit single cycle assertion of outputs during state transitions.


library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
use IEEE.std_logic_signed.all;
entity mealy_LTP_fsm1 is
port (
clk: in STD_LOGIC;
L: in STD_LOGIC;
rst: in STD_LOGIC;
P: out STD_LOGIC);
end mealy_LTP_fsm1;
architecture mealy_LTP_fsm1_arch of mealy_LTP_fsm1 is
-- SYMBOLIC ENCODED state machine: Sreg0
type Sreg0_type is (
S3, S4
);
-- attribute enum_encoding of Sreg0_type: type is ... -- enum_encoding attribute is not supported for symbolic encoding
signal Sreg0: Sreg0_type;
begin
-- concurrent signals assignments
-- Diagram ACTION
----------------------------------------------------------------------
-- Machine: Sreg0
----------------------------------------------------------------------
Sreg0_machine: process (clk)
begin
if clk'event and clk = '1' then
if rst='1' then
Sreg0 <= S3;
-- Set default values for outputs, signals and variables
-- ...
P <= '0'; else -- Set default values for outputs, signals and variables -- ... case Sreg0 is when S3 =>
P <= '0';
if L='1' then
Sreg0 <= S4;
P <= '1';
elsif L='0' then
Sreg0 <= S3; end if; when S4 =>
P <= '0';
if L='1' then
Sreg0 <= S4;
elsif L='0' then
Sreg0 <= S3;
P <= '0'; end if; --vhdl_cover_off when others =>
null;
--vhdl_cover_on
end case;
end if;
end if;
end process;
end mealy_LTP_fsm1_arch;

Moore/Mealy Trade-Offs • How are they different? – Moore: outputs = f( state ) only – Mealy outputs = f( state and input ) – Mealy outputs generally occur one cycle earlier than a Moore:

• Compared to a Moore FSM, a Mealy FSM might… – Be more difficult to conceptualize and design – Have fewer states

moore fsm and its waveform based on fsm only , seen same result as that of earlier.

here also mealy fsm and its waveform based on fsm only , seen same result as that of earlier.

let see what will happens after rtl to gate net list transformation using synthesis tool.

Please feel free to drop comment for your quires, codes will be provided on request for free.

 

 

 

 

By admin

108 thoughts on “level to pulse converter rtl design”
  1. With havin so much content and articles do you ever run into any issues
    of plagorism or copyright violation? My site has a lot of unique content I’ve either written myself or outsourced but it seems a lot of it is popping it up all over the internet without my authorization. Do you
    know any ways to help stop content from being ripped off?
    I’d truly appreciate it.

  2. I blog frequently and I seriously thank you for your
    content. The article has truly peaked my interest.
    I am going to take a note of your website and keep checking
    for new information about once per week. I opted in for your RSS
    feed too.

  3. Great blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple tweeks
    would really make my blog shine. Please let me know where
    you got your theme. Thank you

  4. Thanks for sharing superb informations. Your web site is so cool. I’m impressed by the details that you have on this site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the information I already searched all over the place and just could not come across. What a great web site.

  5. I do not know whether it’s just me or if everybody else experiencing problems with your site.
    It appears as if some of the written text within your content are
    running off the screen. Can somebody else please provide feedback and let me know if this is happening
    to them as well? This may be a problem with my browser
    because I’ve had this happen previously. Thank you

    My web page; vpn special coupon code 2024

  6. I’m often to blogging and i really appreciate your content. The article has actually peaks my interest. I’m going to bookmark your web site and maintain checking for brand spanking new information.

  7. prediksi77
    First of all I would like to say terrific blog! I had a quick question that I’d like to ask
    if you don’t mind. I was interested to know how you center yourself and clear your head prior to writing.
    I’ve had a hard time clearing my thoughts in getting my thoughts out.
    I do enjoy writing but it just seems like the first 10 to 15 minutes are generally lost simply just trying to figure out how to begin. Any suggestions or hints?
    Cheers!

  8. boti adalah
    I am not sure where you are getting your information, but good topic.

    I needs to spend some time learning much more or understanding more.
    Thanks for great info I was looking for this info for my
    mission.

  9. gocengqq
    Hi, i read your blog from time to time and i own a similar one
    and i was just wondering if you get a lot of spam responses?
    If so how do you reduce it, any plugin or anything you can suggest?
    I get so much lately it’s driving me insane so any help is very much appreciated.

  10. kumpulan film philippines
    Hello outstanding blog! Does running a blog like this take a great deal of work?
    I have virtually no expertise in programming but I had been hoping to start my own blog in the near future.

    Anyway, if you have any recommendations or tips for new blog owners please share.
    I know this is off subject nevertheless I simply needed to ask.
    Many thanks!

  11. Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
    Мы предлагаем: ремонт бытовой техники в москве
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  12. best togel best togel best togel
    Hi there just wanted to give you a brief heads up and
    let you know a few of the pictures aren’t loading properly.
    I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both
    show the same results.

  13. tokekwin
    Simply want to say your article is as amazing.

    The clarity in your post is just excellent and i can assume you’re an expert on this
    subject. Fine with your permission let me to grab your feed to keep updated with forthcoming post.
    Thanks a million and please keep up the rewarding work.

  14. boba55
    Hi there! This is kind of off topic but I need some guidance from an established blog.
    Is it difficult to set up your own blog? I’m not very techincal
    but I can figure things out pretty fast.

    I’m thinking about creating my own but I’m not sure where to start.
    Do you have any ideas or suggestions? Thanks

  15. akun demo akun demo
    akun demo
    I’m not that much of a online reader to be honest but your
    blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back down the road.
    Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *