Re: What is considered SUCCESS?



-- (C)2008 K Ring Technologies Semiconductor
-- BSD http://nibz.googlecode.com (no support)
-- Comercial licencing available
-- Tel: +44 796 797 3001 (a real space odessy)
-- Maintained by Simon Jackson, BEng.
-- E-mail: jackokring@xxxxxxxxx

-- Hardware support kodek for nibz

library ieee;
-- library altera;

use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;

entity k is
port (
do : buffer std_Logic;
di : in std_logic;
busy : buffer std_logic;
comde : std_logic;
clk : in std_logic;
-- a rising edge signal (run)
run : in std_logic;
-- for setting the prbs
-- may be of use as a general prbs ...
load : in std_logic_vector(15 downto 0);
save : buffer std_logic_vector(15 downto 0);
rw : in std_logic;
sel : in std_logic
);
end entity;

architecture rtl of k is
signal asymproc : std_logic;
signal which : std_logic;
type s is (action,motion);
signal state : s;
-- intermediates
signal wind : std_logic_vector(4 downto 0);
signal procp : std_logic_vector(1 downto 0);
signal tapx : std_logic;
signal ends : std_logic;
-- process control flags
signal procdo : std_logic;
signal winddo : std_logic;
signal modo : std_logic;
signal runlast : std_logic;
constant tap : natural := 3;
signal pmux : std_logic_vector(15 downto 0);
begin
process(clk)
-- prbs
begin

end process;

procp <= pmux(1 downto 0);
procdo <= procp(1) and procp(0);
-- set motion velocities via probability switching
modo <= procdo xor which xor do xor '1';
-- set sampling window
wind <= pmux(7 downto 3);
winddo <= wind(4) and wind(3) and wind(2) and
wind(1) and wind(0);

process(clk)
-- k state machine
begin
if(rising_edge(clk)) then
runlast <= run;
end if;
if(rising_edge(clk) and busy = '1') then
case state is
when motion =>
asymproc <= asymproc xor modo;
state <= action;
when action =>
if(asymproc = '0') then
if(which = '0') then
-- sample
if(winddo = '1') then
busy <= '0';
-- sample do
end if;
else
-- random
do <= do xor procp(0);
end if;
else
which <= which xor procdo;
end if;
state <= motion;
end case;
-- NB. if 2nd rising edge run before busy zero
-- then ignored
elsif(rising_edge(clk) and runlast = '0' and run = '1') then
-- set busy, cleared by kodek finish bit
busy <= '1';
do <= di;
end if;
-- prbs
if(comde = '1') then
ends <= save(15);
else
ends <= save(0);
end if;
tapx <= save(tap) xor ends;
if(rising_edge(clk) and busy = '1') then
if(comde = '1') then
save <= save(14 downto 0)&tapx;
else
save <= tapx&save(15 downto 1);
end if;
end if;
if(comde = '1') then
pmux <= save;
else
pmux <= tapx&save(15 downto 1);
end if;
-- load
if(rising_edge(clk) and sel = '1' and rw = '0') then
-- NB. a load while busy can be a random number gen
-- but not much use in general operation
-- do a kind of reset
asymproc <= '0'; -- rand/samp side
which <= '0'; -- samp side
state <= motion; -- perform motion methods first
-- (begin and end on them)
-- assign essentials
save <= load;
end if;
end process;
end rtl;
.



Relevant Pages

  • Almost an entropy reducer (bias element)?
    ... -- may be of use as a general prbs ... ... modo <= procdo xor which xor do xor '1'; ... ifand busy = '1') then ... a load while busy can be a random number gen ...
    (comp.compression)
  • Re: why, hello boys and girls
    ... busy: buffer std_logic; ... signal procdo: std_logic; ... signal whenok: std_logic; ... modo <= procdo xor which xor do xor '1'; ...
    (comp.compression)
  • Re: Factoring and entropy
    ... I think the definition is entropy is expected self-information E ... busy: buffer std_logic; ... signal whenok: std_logic; ... modo <= procdo xor which xor do xor '1'; ...
    (comp.lang.forth)
  • Re: "AND"ing and "OR"ing two PRBS
    ... I think he means Pseudo Random Binary Sequence. ... But you can XOR them. ... >> result be a prbs. ... > Mitch Harris ...
    (sci.math)

Loading