Skip to content

Commit

Permalink
Add byte/uchar version of verilog block (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeppe Johansen <jgj@gomspace.com>
  • Loading branch information
gs-jgj authored and B0WEN-HU committed Sep 23, 2019
1 parent 896b91d commit 9ae8285
Show file tree
Hide file tree
Showing 11 changed files with 719 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This is an OOT module for GNU Radio integrating verilog simulation. This module can run Verilog simulation at runtime in GNU Radio based on [Verilator](https://www.veripool.org/wiki/verilator/), an open-source Verilog simulator.

So far, serveral blocks namely `verilog_axi_ii`, `verilog_axi_ff`, `verilog_axi_ss` and `verilog_axi_cc`, hereinafter referred to as `verilog_axi_xx`, were implemented.
So far, serveral blocks namely `verilog_axi_ii`, `verilog_axi_ff`, `verilog_axi_ss`, `verilog_axi_bb` and `verilog_axi_cc`, hereinafter referred to as `verilog_axi_xx`, were implemented.

The `verilog_axi_xx` block can be used in both python code or GNU Radio Companion.

Expand Down
5 changes: 5 additions & 0 deletions grc/verilog_verilog_axi_xx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
<key>short</key>
<opt>fcn:ss</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
<opt>fcn:bb</opt>
</option>
</param>
<param>
<name>Overwrite</name>
Expand Down
4 changes: 2 additions & 2 deletions grc/verilog_verilog_axi_xx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ parameters:
- id: type
label: IO Type
dtype: enum
options: [complex, float, int, short]
options: [complex, float, int, short, byte]
option_attributes:
fcn: [cc, ff, ii, ss]
fcn: [cc, ff, ii, ss, bb]
hide: part
- id: overwrite
label: Overwrite
Expand Down
1 change: 1 addition & 0 deletions include/verilog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ install(FILES
verilog_axi_ii.h
verilog_axi_ff.h
verilog_axi_ss.h
verilog_axi_bb.h
verilog_axi_cc.h DESTINATION include/verilog
)
58 changes: 58 additions & 0 deletions include/verilog/verilog_axi_bb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* -*- c++ -*- */
/*
* Copyright 2019 <+YOU OR YOUR COMPANY+>.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/


#ifndef INCLUDED_VERILOG_VERILOG_AXI_BB_H
#define INCLUDED_VERILOG_VERILOG_AXI_BB_H

#include <verilog/api.h>
#include <gnuradio/block.h>

namespace gr {
namespace verilog {

/*!
* \brief <+description of block+>
* \ingroup verilog
*
*/
class VERILOG_API verilog_axi_bb : virtual public gr::block
{
public:
typedef boost::shared_ptr<verilog_axi_bb> sptr;

/*!
* \brief Return a shared_ptr to a new instance of verilog::verilog_axi_bb.
*
* To avoid accidental use of raw pointers, verilog::verilog_axi_bb's
* constructor is in a private implementation
* class. verilog::verilog_axi_bb::make is the public interface for
* creating new instances.
*/
static sptr make(const char *filename, bool overwrite, float IO_ratio,
const char *verilator_options, unsigned int module_flag,
unsigned int skip_output_items);
};

} // namespace verilog
} // namespace gr

#endif /* INCLUDED_VERILOG_VERILOG_AXI_BB_H */

1 change: 1 addition & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ list(APPEND verilog_sources
Shared_lib.cpp
verilog_axi_ff_impl.cc
verilog_axi_ss_impl.cc
verilog_axi_bb_impl.cc
verilog_axi_cc_impl.cc
)

Expand Down
Loading

0 comments on commit 9ae8285

Please sign in to comment.