Commit 7f5f0fc5 authored by Guillaume REMBERT's avatar Guillaume REMBERT

SRRC corrections + export samples capabilities for testbench + reduction of TX...

SRRC corrections + export samples capabilities for testbench + reduction of TX quantization depth to 8 bits
parent 0fb3aaba
......@@ -21,6 +21,7 @@ files =
ccsds_rx_physical_layer.vhd
ccsds_tx.vhd
ccsds_tx_coder.vhd
# ccsds_tx_coder_convolutional.vhd
ccsds_tx_coder_differential.vhd
ccsds_tx_datalink_layer.vhd
ccsds_tx_filter.vhd
......
This diff is collapsed.
......@@ -28,6 +28,7 @@ package ccsds_rxtx_functions is
function convert_boolean_to_std_logic(input: in boolean) return std_logic;
function reverse_std_logic_vector (input: in std_logic_vector) return std_logic_vector;
-- simulation / testbench only functions
function convert_std_logic_vector_to_hexa_ascii(input: in std_logic_vector) return string;
procedure sim_generate_random_std_logic_vector(vector_size : in integer; seed1 : inout positive; seed2 : inout positive; result : out std_logic_vector);
end ccsds_rxtx_functions;
......@@ -43,15 +44,63 @@ package body ccsds_rxtx_functions is
end convert_boolean_to_std_logic;
function reverse_std_logic_vector (input: in std_logic_vector) return std_logic_vector is
variable result: std_logic_vector(input'RANGE);
variable result: std_logic_vector(input'range);
alias output: std_logic_vector(input'REVERSE_RANGE) is input;
begin
for vector_pointer in output'RANGE loop
for vector_pointer in output'range loop
result(vector_pointer) := output(vector_pointer);
end loop;
return result;
end;
function convert_std_logic_vector_to_hexa_ascii(input: in std_logic_vector) return string is
constant words_number: integer := input'length/4;
variable result: string(words_number-1 downto 0);
variable word: std_logic_vector(3 downto 0);
begin
for vector_word_pointer in words_number-1 downto 0 loop
word := input((vector_word_pointer+1)*4-1 downto vector_word_pointer*4);
case word is
when "0000" =>
result(vector_word_pointer) := '0';
when "0001" =>
result(vector_word_pointer) := '1';
when "0010" =>
result(vector_word_pointer) := '2';
when "0011" =>
result(vector_word_pointer) := '3';
when "0100" =>
result(vector_word_pointer) := '4';
when "0101" =>
result(vector_word_pointer) := '5';
when "0110" =>
result(vector_word_pointer) := '6';
when "0111" =>
result(vector_word_pointer) := '7';
when "1000" =>
result(vector_word_pointer) := '8';
when "1001" =>
result(vector_word_pointer) := '9';
when "1010" =>
result(vector_word_pointer) := 'a';
when "1011" =>
result(vector_word_pointer) := 'b';
when "1100" =>
result(vector_word_pointer) := 'c';
when "1101" =>
result(vector_word_pointer) := 'd';
when "1110" =>
result(vector_word_pointer) := 'e';
when "1111" =>
result(vector_word_pointer) := 'f';
when others =>
result(vector_word_pointer) := '?';
end case;
-- report "Converted " & integer'image(to_integer(resize(unsigned(word),16))) & " to " & result(vector_word_pointer) severity note;
end loop;
return result;
end;
procedure sim_generate_random_std_logic_vector(vector_size : in integer; seed1 : inout positive; seed2 : inout positive; result : out std_logic_vector) is
variable rand: real := 0.0;
variable temp: std_logic_vector(31 downto 0);
......
......@@ -37,6 +37,6 @@ package ccsds_rxtx_parameters is
-- NETWORK LAYER
-- DATALINK LAYER
-- PHYSICAL LAYER
constant TX_PHYS_SIG_QUANT_DEPTH: integer := 16;-- DIGITAL PROCESSING QUANTIFICATION DEPTH IN BITS NUMBER
constant TX_PHYS_SIG_QUANT_DEPTH: integer := 8;-- DIGITAL PROCESSING QUANTIFICATION DEPTH IN BITS NUMBER
constant RX_PHYS_SIG_QUANT_DEPTH: integer := 16;-- DIGITAL PROCESSING QUANTIFICATION DEPTH IN BITS NUMBER
end ccsds_rxtx_parameters;
......@@ -19,8 +19,8 @@
---- 2016/11/06: initial release
-------------------------------
-- Filter impulse response - SRRC(t):
-- t = 0 => SRRC(0) = 1
-- t = +/-Ts/(4*B) => SRRC(+/-Ts/(4*B)) = sin(PI.(1-B)/(4.B)) + cos(PI.(1+B)/(4.B))
-- t = 0 => SRRC(0) = (1-B + 4*B/PI)
-- t = +/-Ts/(4*B) => SRRC(+/-Ts/(4*B)) = (B/racine(2) * (1+2/PI) * sin(PI/(4*B)) + (1-2/PI) * cos(PI/(4*B)))
-- t /= 0 and t /= Ts/(4*B) => SRRC(t) = (sin(PI.t.(1-B)/Ts) + 4.B.t.cos(PI.t.(1+B)/Ts)/Ts) / (PI.t.(1-((4.B.t)/Ts)^2)/Ts)
-- t: time
-- Ts: symbol period
......@@ -62,7 +62,9 @@ architecture rtl of ccsds_rxtx_srrc is
constant CCSDS_RXTX_SRRC_RESPONSE_SYMBOL_CYCLES: integer:= 6; -- in symbol Time
constant CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER: integer := CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO*CCSDS_RXTX_SRRC_RESPONSE_SYMBOL_CYCLES+1;
constant CCSDS_RXTX_SRRC_SAMPLES_NUMBER: integer := (CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1)*2+1;
constant CCSDS_RXTX_SRRC_NORMALIZATION_GAIN: real := 2.0**(real(CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH) - real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO)**0.5) - 1.0; -- Exact value should be FIR coefficients RMS Gain = Sqrt(Sum(Pow(coef,2)))) * Full Scale Value
constant CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_T0: real := (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF + 4.0 * CCSDS_RXTX_SRRC_ROLL_OFF / MATH_PI);
constant CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_TS: real := (CCSDS_RXTX_SRRC_ROLL_OFF / sqrt(2.0) * (1.0 + 2.0 / MATH_PI) * sin (MATH_PI / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)) + (1.0 - 2.0 / MATH_PI) * cos (MATH_PI / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)));
constant CCSDS_RXTX_SRRC_NORMALIZATION_GAIN: real := (2.0**(CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH - 1) - 1.0) / CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_T0; -- Exact value should be FIR coefficients RMS Gain / T0 Gain = Sqrt(Sum(Pow(coef,2)))) * Full Scale Value
constant CCSDS_RXTX_SRRC_SIG_IN_ADD_SIZE: integer := CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH+1;
constant CCSDS_RXTX_SRRC_SIG_MUL_SIZE: integer := CCSDS_RXTX_SRRC_SIG_IN_ADD_SIZE+CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH;
constant CCSDS_RXTX_SRRC_SIG_OUT_ADD_SIZE: integer := CCSDS_RXTX_SRRC_SIG_MUL_SIZE;
......@@ -82,19 +84,20 @@ architecture rtl of ccsds_rxtx_srrc is
begin
-- SRRC coefficients generation
-- At t = 0
srrc_coefficients(0) <= to_signed(integer(CCSDS_RXTX_SRRC_NORMALIZATION_GAIN),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
srrc_coefficients(0) <= to_signed(integer(CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_T0),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
-- Coefficients are symetrical / they are computed only for positive time response
SRRC_COEFS_GENERATOR: for coefficient_counter in 1 to CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO*CCSDS_RXTX_SRRC_RESPONSE_SYMBOL_CYCLES generate
-- At t = Ts/(4*B)
SRRC_SPECIFIC_COEFS: if (real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO)/real(coefficient_counter) = 4.0*CCSDS_RXTX_SRRC_ROLL_OFF) generate
SRRC_COEFS_WINDOW_DIRICHLET: if (CCSDS_RXTX_SRRC_APODIZATION_WINDOW_TYPE = 0) generate
srrc_coefficients(coefficient_counter) <= to_signed(integer(CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * (sin(MATH_PI * (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF) / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)) + cos(MATH_PI * (1.0 + CCSDS_RXTX_SRRC_ROLL_OFF) / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)))),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
srrc_coefficients(coefficient_counter) <= to_signed(integer(CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_TS),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
end generate SRRC_COEFS_WINDOW_DIRICHLET;
SRRC_COEFS_WINDOW_HAMMING: if (CCSDS_RXTX_SRRC_APODIZATION_WINDOW_TYPE = 1) generate
srrc_coefficients(coefficient_counter) <= to_signed(integer((0.54 + 0.46 * cos(2.0 * MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1))) * CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * (sin(MATH_PI * (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF) / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)) + cos(MATH_PI * (1.0 + CCSDS_RXTX_SRRC_ROLL_OFF) / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)))),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
srrc_coefficients(coefficient_counter) <= to_signed(integer((0.53836 + 0.46164 * cos(2.0 * MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1))) * CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_TS),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
end generate SRRC_COEFS_WINDOW_HAMMING;
SRRC_COEFS_WINDOW_BARTLETT: if (CCSDS_RXTX_SRRC_APODIZATION_WINDOW_TYPE = 2) generate
srrc_coefficients(coefficient_counter) <= to_signed(integer((1.0 - abs((real(coefficient_counter) - real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1)/2.0) / real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1)/2.0)) * CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * (sin(MATH_PI * (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF) / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)) + cos(MATH_PI * (1.0 + CCSDS_RXTX_SRRC_ROLL_OFF) / (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF)))),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
srrc_coefficients(0) <= to_signed(integer(CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_T0),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
srrc_coefficients(coefficient_counter) <= to_signed(integer((1.0 - abs((real(coefficient_counter) - real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1)/2.0) / real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1)/2.0)) * CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * CCSDS_RXTX_SRRC_SPECIFIC_COEFFICIENT_VALUE_TS),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
end generate SRRC_COEFS_WINDOW_BARTLETT;
end generate SRRC_SPECIFIC_COEFS;
-- At t > 0 and t /= Ts/(4*B)
......@@ -103,7 +106,7 @@ architecture rtl of ccsds_rxtx_srrc is
srrc_coefficients(coefficient_counter) <= to_signed(integer(CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * (sin(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF)) + 4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * cos(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 + CCSDS_RXTX_SRRC_ROLL_OFF))) / (MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO))**2))),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
end generate SRRC_COEFS_WINDOW_DIRICHLET;
SRRC_COEFS_WINDOW_HAMMING: if (CCSDS_RXTX_SRRC_APODIZATION_WINDOW_TYPE = 1) generate
srrc_coefficients(coefficient_counter) <= to_signed(integer((0.54 + 0.46 * cos(2.0 * MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1))) *CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * (sin(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF)) + 4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * cos(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 + CCSDS_RXTX_SRRC_ROLL_OFF))) / (MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO))**2))),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
srrc_coefficients(coefficient_counter) <= to_signed(integer((0.53836 + 0.46164 * cos(2.0 * MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1))) * CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * (sin(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF)) + 4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * cos(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 + CCSDS_RXTX_SRRC_ROLL_OFF))) / (MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO))**2))),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
end generate SRRC_COEFS_WINDOW_HAMMING;
SRRC_COEFS_WINDOW_BARTLETT: if (CCSDS_RXTX_SRRC_APODIZATION_WINDOW_TYPE = 2) generate
srrc_coefficients(coefficient_counter) <= to_signed(integer((1.0 - abs((real(coefficient_counter) - real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1)/2.0) / real(CCSDS_RXTX_SRRC_FIR_COEFFICIENTS_NUMBER-1)/2.0)) * CCSDS_RXTX_SRRC_NORMALIZATION_GAIN * (sin(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - CCSDS_RXTX_SRRC_ROLL_OFF)) + 4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * cos(MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 + CCSDS_RXTX_SRRC_ROLL_OFF))) / (MATH_PI * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO) * (1.0 - (4.0 * CCSDS_RXTX_SRRC_ROLL_OFF * real(coefficient_counter) / real(CCSDS_RXTX_SRRC_OVERSAMPLING_RATIO))**2))),CCSDS_RXTX_SRRC_SIG_QUANT_DEPTH);
......
......@@ -18,7 +18,7 @@ library ieee;
use ieee.std_logic_1164.all;
--=============================================================================
-- Entity declaration for ccsds_tx / unitary tx mapper inputs and outputs
-- Entity declaration for ccsds_tx / unitary tx differential coder inputs and outputs
--=============================================================================
entity ccsds_tx_coder_differential is
generic(
......@@ -37,7 +37,6 @@ entity ccsds_tx_coder_differential is
);
end ccsds_tx_coder_differential;
--=============================================================================
-- architecture declaration / internal components and connections
--=============================================================================
......
......@@ -48,15 +48,15 @@ architecture rtl of ccsds_tx_mapper_symbols_samples is
-- internal constants
constant QUANTIZATION_SNR: real := 6.02*real(CCSDS_TX_MAPPER_QUANTIZATION_DEPTH);
constant REQUIRED_SNR: real := real(2 + 2*CCSDS_TX_MAPPER_BITS_PER_SYMBOL) + CCSDS_TX_MAPPER_TARGET_SNR;
constant SYMBOL_STEP: real := real(2**(CCSDS_TX_MAPPER_QUANTIZATION_DEPTH-CCSDS_TX_MAPPER_BITS_PER_SYMBOL)-1);
constant SYMBOL_STEP: real := 2.0**(CCSDS_TX_MAPPER_QUANTIZATION_DEPTH) / real(CCSDS_TX_MAPPER_BITS_PER_SYMBOL+1);
-- internal variable signals
type samples_array is array(2**(CCSDS_TX_MAPPER_BITS_PER_SYMBOL)-1 downto 0) of std_logic_vector(CCSDS_TX_MAPPER_QUANTIZATION_DEPTH-1 downto 0);
signal symbols_values: samples_array;
-- components instanciation and mapping
begin
SYMBOLS_VALUES_GENERATOR: for symbol_counter in 0 to 2**(CCSDS_TX_MAPPER_BITS_PER_SYMBOL-1)-1 generate
symbols_values(2**(CCSDS_TX_MAPPER_BITS_PER_SYMBOL-1)+symbol_counter) <= std_logic_vector(to_signed(integer(real(symbol_counter+1) * SYMBOL_STEP),CCSDS_TX_MAPPER_QUANTIZATION_DEPTH));
symbols_values(2**(CCSDS_TX_MAPPER_BITS_PER_SYMBOL-1)-symbol_counter-1) <= std_logic_vector(to_signed(integer(-(1.0) * real(symbol_counter+1) * SYMBOL_STEP),CCSDS_TX_MAPPER_QUANTIZATION_DEPTH));
symbols_values(2**(CCSDS_TX_MAPPER_BITS_PER_SYMBOL-1)+symbol_counter) <= std_logic_vector(to_signed(integer(2.0**(CCSDS_TX_MAPPER_QUANTIZATION_DEPTH-1) - 1.0 - real(symbol_counter) * SYMBOL_STEP),CCSDS_TX_MAPPER_QUANTIZATION_DEPTH));
symbols_values(2**(CCSDS_TX_MAPPER_BITS_PER_SYMBOL-1)-symbol_counter-1) <= std_logic_vector(to_signed(integer(-(2.0**(CCSDS_TX_MAPPER_QUANTIZATION_DEPTH-1)) + 1.0 + real(symbol_counter) * SYMBOL_STEP),CCSDS_TX_MAPPER_QUANTIZATION_DEPTH));
end generate SYMBOLS_VALUES_GENERATOR;
-- presynthesis checks
-- Check SNR level requested is respected
......
#
# Clock (internal) / Reset (push button 0)
# Clock <-> CLOCK_50 (50 Mhz Clock) / Reset <-> KEY0 (push button 0)
#
set_location_assignment PIN_J15 -to rst_n_pad_i
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to rst_n_pad_i
......@@ -17,45 +17,42 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to uart0_stx_pad_o
#
# CCSDS_RXTX0: PINS
#
#RX EXTERNAL IN/OUT
#FIXME: CHANGE ASSIGNATION / TBD as clk (yet push button 1)
#set_location_assignment PIN_E1 -to ccsds_rxtx0_rx_clk_i
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_rx_clk_i
#Switch 0 as i serial samples
#set_location_assignment PIN_M1 -to ccsds_rxtx0_rx_sam_i_i
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_rx_sam_i_i
#Switch 1 as q serial samples
#set_location_assignment PIN_T8 -to ccsds_rxtx0_rx_sam_q_i
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_rx_sam_q_i
#LED 0 as RX enabled
#RX INPUTS
#RX OUTPUTS
# RX enabled <-> LED 0
set_location_assignment PIN_A15 -to ccsds_rxtx0_rx_ena_o
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_rx_ena_o
#LED 1 as demodulated data clk
#set_location_assignment PIN_A13 -to ccsds_rxtx0_rx_clk_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_rx_clk_o
#LED 2 as serial demodulated data
#set_location_assignment PIN_B13 -to ccsds_rxtx0_rx_data_ser_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_rx_data_ser_o
#TX EXTERNAL IN/OUT
#GPIO_00 as external clk input
set_location_assignment PIN_D3 -to ccsds_rxtx0_tx_clk_i
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_clk_i
#GPIO_01 as external serial data input
set_location_assignment PIN_C3 -to ccsds_rxtx0_tx_dat_ser_i
#TX INPUTS
# External serial data <-> GPIO_00
set_location_assignment PIN_D3 -to ccsds_rxtx0_tx_dat_ser_i
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_dat_ser_i
#GPIO_O27 as ??
#set_location_assignment PIN_E10 -to ccsds_rxtx0_tx_sam_val_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_samples_valid_o
#GPIO_O29 as LSB i samples output
set_location_assignment PIN_B11 -to ccsds_rxtx0_tx_sam_i_o[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_sam_i_o[0]
#GPIO_O31 as LSB q samples output
set_location_assignment PIN_D11 -to ccsds_rxtx0_tx_sam_q_o[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_sam_q_o[0]
#GPIO_O33 as samples clk output
set_location_assignment PIN_B12 -to ccsds_rxtx0_tx_clk_o
#TX OUTPUTS
# Samples clock <-> GPIO_01
set_location_assignment PIN_C3 -to ccsds_rxtx0_tx_clk_o
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_clk_o
#LED 7 as TX enabled
# Samples I <-> GPIO_18, GPIO_20, ..., GIO_032
# MSB/Sign is GPIO_18 / LSB is GPIO_O32
set_location_assignment PIN_E7 -to ccsds_rxtx0_tx_sam_i_o[0]
set_location_assignment PIN_E8 -to ccsds_rxtx0_tx_sam_i_o[1]
set_location_assignment PIN_F9 -to ccsds_rxtx0_tx_sam_i_o[2]
set_location_assignment PIN_C9 -to ccsds_rxtx0_tx_sam_i_o[3]
set_location_assignment PIN_E11 -to ccsds_rxtx0_tx_sam_i_o[4]
set_location_assignment PIN_C11 -to ccsds_rxtx0_tx_sam_i_o[5]
set_location_assignment PIN_A12 -to ccsds_rxtx0_tx_sam_i_o[6]
set_location_assignment PIN_D12 -to ccsds_rxtx0_tx_sam_i_o[7]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_sam_i_o[*]
# Samples Q <-> GPIO_19, GPIO_21, ..., GIO_033
# MSB/Sign is GPIO_19 / LSB is GPIO_O33
set_location_assignment PIN_D8 -to ccsds_rxtx0_tx_sam_q_o[0]
set_location_assignment PIN_F8 -to ccsds_rxtx0_tx_sam_q_o[1]
set_location_assignment PIN_E9 -to ccsds_rxtx0_tx_sam_q_o[2]
set_location_assignment PIN_D9 -to ccsds_rxtx0_tx_sam_q_o[3]
set_location_assignment PIN_E10 -to ccsds_rxtx0_tx_sam_q_o[4]
set_location_assignment PIN_B11 -to ccsds_rxtx0_tx_sam_q_o[5]
set_location_assignment PIN_D11 -to ccsds_rxtx0_tx_sam_q_o[6]
set_location_assignment PIN_B12 -to ccsds_rxtx0_tx_sam_q_o[7]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_sam_q_o[*]
# TX enabled <-> LED 7
set_location_assignment PIN_L3 -to ccsds_rxtx0_tx_ena_o
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to ccsds_rxtx0_tx_ena_o
......@@ -73,25 +70,17 @@ set_location_assignment PIN_B1 -to gpio0_io[6]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to gpio0_io[*]
#
# GPIO1: Switches + Push buttons
#
# Switches
#set_location_assignment PIN_M1 -to gpio1_i[0]
#set_location_assignment PIN_T8 -to gpio1_i[1]
#set_location_assignment PIN_B9 -to gpio1_i[2]
#set_location_assignment PIN_M15 -to gpio1_i[3]
# Push buttons
#set_location_assignment PIN_J15 -to gpio1_i[4]
#set_location_assignment PIN_E1 -to gpio1_i[5]
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to gpio1_i[*]
#
# I2C0: Connected to the EEPROM
# I2C0: Connected to the EEPROM and accelerometer
#
set_location_assignment PIN_F2 -to i2c0_scl_io
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to i2c0_scl_io
set_location_assignment PIN_F1 -to i2c0_sda_io
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to i2c0_sda_io
# I2C0: Accelerometer specific lines
set_location_assignment PIN_M2 -to accelerometer_irq_i
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to accelerometer_irq_i
set_location_assignment PIN_G5 -to accelerometer_cs_o
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to accelerometer_cs_o
#
# SPI0: Connected to the EPCS
......@@ -109,6 +98,18 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi0_sck_o
set_location_assignment PIN_D2 -to spi0_ss_o
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi0_ss_o
#
# SPI1: Connected to the AD converter
#
#set_location_assignment PIN_B10 -to spi1_mosi_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_mosi_o
#set_location_assignment PIN_A9 -to spi1_miso_i
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_miso_i
#set_location_assignment PIN_B14 -to spi1_sck_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_sck_o
#set_location_assignment PIN_A10 -to spi1_ss_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_ss_o
#
# SDRAM
#
......@@ -199,29 +200,3 @@ set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to sdram_we_pad_o
set_location_assignment PIN_R4 -to sdram_clk_pad_o
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to sdram_clk_pad_o
#ADC
#set_location_assignment PIN_B10 -to spi1_mosi_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_mosi_o
#set_location_assignment PIN_A9 -to spi1_miso_i
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_miso_i
#set_location_assignment PIN_B14 -to spi1_sck_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_sck_o
#set_location_assignment PIN_A10 -to spi1_ss_o
#set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to spi1_ss_o
#GPIO_2[0] PIN_A14
#GPIO_2[1] PIN_B16
#GPIO_2[2] PIN_C14
#GPIO_2[3] PIN_C16
#GPIO_2[4] PIN_C15
#GPIO_2[5] PIN_D16
#GPIO_2[6] PIN_D15
#GPIO_2[7] PIN_D14
#GPIO_2[8] PIN_F15
#GPIO_2[9] PIN_F16
#GPIO_2[10] PIN_F14
#GPIO_2[11] PIN_G16
#GPIO_2[12] PIN_G15
#GPIO_2_IN[0] PIN_E15
#GPIO_2_IN[1] PIN_E16
#GPIO_2_IN[2] PIN_M16
......@@ -44,7 +44,7 @@ module orpsoc_top #(
parameter EURYSPACE_SPI0_WB_ADR_WIDTH = 3,
parameter EURYSPACE_CCSDS_RXTX0_WB_ADR_WIDTH = 4,
parameter EURYSPACE_CCSDS_RXTX0_RX_SAM_WIDTH = 16,
parameter EURYSPACE_CCSDS_RXTX0_TX_SAM_WIDTH = 16,
parameter EURYSPACE_CCSDS_RXTX0_TX_SAM_WIDTH = 8,
parameter EURYSPACE_I2C0_SADR = 8'h45
)(
input sys_clk_pad_i,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment