URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [rtl/] [core/] [neorv32_cfs.vhd] - Diff between revs 70 and 71
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 70 |
Rev 71 |
Line 242... |
Line 242... |
end process host_access;
|
end process host_access;
|
|
|
|
|
-- CFS Function Core ----------------------------------------------------------------------
|
-- CFS Function Core ----------------------------------------------------------------------
|
-- -------------------------------------------------------------------------------------------
|
-- -------------------------------------------------------------------------------------------
|
-- This is where the actual functionality can be implemented.
|
|
-- In this example we are just implementing four r/w registers that invert any value written to them.
|
|
|
|
|
-- This is where the actual functionality can be implemented.
|
|
-- The logic below is just a very simple example that transforms data
|
|
-- from an inpout register into data in an output register.
|
cfs_core_logic: process(cfs_reg_wr)
|
cfs_core_logic: process(cfs_reg_wr)
|
begin
|
begin
|
cfs_reg_rd(0) <= not cfs_reg_wr(0);
|
cfs_reg_rd(0) <= bin_to_gray_f(cfs_reg_wr(0)); -- convert binary to gray code
|
cfs_reg_rd(1) <= not cfs_reg_wr(1);
|
cfs_reg_rd(1) <= gray_to_bin_f(cfs_reg_wr(1)); -- convert gray to binary code
|
cfs_reg_rd(2) <= not cfs_reg_wr(2);
|
cfs_reg_rd(2) <= bit_rev_f(cfs_reg_wr(2)); -- bit reversal
|
cfs_reg_rd(3) <= not cfs_reg_wr(3);
|
cfs_reg_rd(3) <= bswap32_f(cfs_reg_wr(3)); -- byte swap (endianness conversion)
|
end process cfs_core_logic;
|
end process cfs_core_logic;
|
|
|
|
|
end neorv32_cfs_rtl;
|
end neorv32_cfs_rtl;
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.