aboutsummaryrefslogtreecommitdiffstats
path: root/host/include/uhd/rfnoc/blocks/schmidlcox.xml
blob: 402e4de0f1b1bbd931ce424b8741fa7b6c2f6c67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!--This defines one NoC-Block.-->
<nocblock>
  <name>Schmidl &amp; Cox</name>
  <blockname>SchmidlCox</blockname>
  <!--There can be several of these:-->
  <ids>
    <id revision="0">5CC0</id>
  </ids>
  <!-- Registers -->
  <registers>
    <setreg>
      <name>FRAME_LENGTH</name>
      <address>129</address>
    </setreg>
    <setreg>
      <name>CP_LENGTH</name>
      <address>130</address>
    </setreg>
    <setreg>
      <name>DELAY</name>
      <address>131</address>
    </setreg>
    <setreg>
      <name>NUM_SYMBOLS_MAX</name>
      <address>132</address>
    </setreg>
    <setreg>
      <name>THRESHOLD</name>
      <address>134</address>
    </setreg>
  </registers>
  <!-- Args -->
  <args>
    <arg>
      <name>fftsize</name>
      <type>int</type>
      <value>64</value>
      <!--TODO: Make publisher, when setting this value, check if equal to GET()-->
    </arg>
    <arg>
      <name>cp_len</name>
      <type>int</type>
      <value>16</value>
      <action>SR_WRITE("CP_LENGTH", $cp_len)</action>
    </arg>
    <arg>
      <name>threshold</name>
      <type>double</type>
      <value>0.8</value>
      <check>GE($threshold, 0.0) AND LE($threshold, 1.0)</check>
      <check_message>Detection threshold must be in [0, 1].</check_message>
      <action>SR_WRITE("THRESHOLD", IROUND(MULT(32768.0, $threshold)))</action>
    </arg>
    <arg>
      <name>delay</name>
      <type>int</type>
      <value>77</value>
      <check>GE($delay, 0) AND LE($delay, 1000)</check>
      <check_message>Invalid delay.</check_message>
      <action>SR_WRITE("DELAY", $delay)</action>
    </arg>
    <arg>
      <name>max_num_symbols</name>
      <type>int</type>
      <value>12</value>
      <check>GE($max_num_symbols, 0) AND LE($max_num_symbols, 1000)</check>
      <check_message>Invalid number of max symbols.</check_message>
      <action>SR_WRITE("NUM_SYMBOLS_MAX", $max_num_symbols)</action>
    </arg>
  </args>
  <ports>
    <sink>
      <name>in</name>
      <type>sc16</type>
    </sink>
    <source>
      <name>out</name>
      <type>sc16</type>
      <vlen>$fftsize</vlen>
      <pkt_size>%vlen</pkt_size>
    </source>
  </ports>
</nocblock>