Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mock-turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
e39e0a31
Commit
e39e0a31
authored
Apr 26, 2018
by
Federico Vaga
Committed by
Federico Vaga
Apr 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:*: remove unimplemented functionalities
Signed-off-by:
Federico Vaga
<
federico.vaga@vaga.pv.it
>
parent
c044ef73
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
99 deletions
+0
-99
mockturtle-hmq.c
software/kernel/mockturtle-hmq.c
+0
-4
libmockturtle.c
software/lib/libmockturtle.c
+0
-92
libmockturtle.h
software/lib/libmockturtle.h
+0
-3
No files found.
software/kernel/mockturtle-hmq.c
View file @
e39e0a31
...
...
@@ -22,10 +22,6 @@
#include <hw/mockturtle_cpu_csr.h>
#include "mockturtle-drv.h"
static
int
hmq_default_buf_size
=
8192
;
/**< default buffer size in byte */
module_param_named
(
slot_buffer_size
,
hmq_default_buf_size
,
int
,
0444
);
MODULE_PARM_DESC
(
slot_buffer_size
,
"Default buffer size in byte."
);
static
int
hmq_buf_max_msg
=
16
;
module_param_named
(
hmq_buf_max_msg
,
hmq_buf_max_msg
,
int
,
0444
);
MODULE_PARM_DESC
(
hmq_buf_max_msg
,
...
...
software/lib/libmockturtle.c
View file @
e39e0a31
...
...
@@ -678,98 +678,6 @@ int trtl_cpu_dump_application_file(struct trtl_dev *trtl,
}
/**
* It sets the driver input buffer size.
* Note that this does not affect the hardware in any way. The hardware
* maximum number of messages is fixed and cannot be change
* @param[in] hmq HMQ device descriptor
* @param[in] size buffer size in bytes. It must be a power-of-2 value.
* @return 0 on success, -1 on error and errno is set appropriately
*/
int
trtl_hmq_buffer_size_in_set
(
struct
trtl_hmq
*
hmq
,
uint32_t
size
)
{
char
path
[
TRTL_SYSFS_PATH_LEN
];
snprintf
(
path
,
TRTL_SYSFS_PATH_LEN
,
"%s/buffer_size_in"
,
hmq
->
syspath
);
return
trtl_sysfs_printf
(
path
,
"%d"
,
size
);
}
/**
* It gets the driver input buffer size.
* @param[in] hmq HMQ device descriptor
* @param[out] size buffer size in bytes
* @return 0 on success, -1 on error and errno is set appropriately
*/
int
trtl_hmq_buffer_size_in_get
(
struct
trtl_hmq
*
hmq
,
uint32_t
*
size
)
{
char
path
[
TRTL_SYSFS_PATH_LEN
];
snprintf
(
path
,
TRTL_SYSFS_PATH_LEN
,
"%s/buffer_size_in"
,
hmq
->
syspath
);
return
trtl_sysfs_scanf
(
path
,
"%d"
,
size
);
}
/**
* It sets the driver output buffer size.
* Note that this does not affect the hardware in any way. The hardware
* maximum number of messages is fixed and cannot be change
* @param[in] hmq HMQ device descriptor
* @param[in] size buffer size in bytes. It must be a power-of-2 value.
* @return 0 on success, -1 on error and errno is set appropriately
*/
int
trtl_hmq_buffer_size_out_set
(
struct
trtl_hmq
*
hmq
,
uint32_t
size
)
{
char
path
[
TRTL_SYSFS_PATH_LEN
];
snprintf
(
path
,
TRTL_SYSFS_PATH_LEN
,
"%s/buffer_size_out"
,
hmq
->
syspath
);
return
trtl_sysfs_printf
(
path
,
"%d"
,
size
);
}
/**
* It gets the driver output buffer size.
* @param[in] hmq HMQ device descriptor
* @param[out] size buffer size in bytes
* @return 0 on success, -1 on error and errno is set appropriately
*/
int
trtl_hmq_buffer_size_out_get
(
struct
trtl_hmq
*
hmq
,
uint32_t
*
size
)
{
char
path
[
TRTL_SYSFS_PATH_LEN
];
snprintf
(
path
,
TRTL_SYSFS_PATH_LEN
,
"%s/buffer_size_out"
,
hmq
->
syspath
);
return
trtl_sysfs_scanf
(
path
,
"%d"
,
size
);
}
/**
* It gets the maximum number of messages that can be saved in the buffer
* @param[in] hmq HMQ device descriptor
* @param[out] max maximum number of messages in the buffer
* @return 0 on success, -1 on error and errno is set appropriately
*/
int
trtl_hmq_msg_max_get
(
struct
trtl_hmq
*
hmq
,
uint32_t
*
max
)
{
#if 0
struct trtl_desc *wdesc = (struct trtl_desc *)hmq->trtl;
uint32_t buf_size;
int err;
err = trtl_hmq_buffer_size_get(hmq, &buf_size);
if (err)
return err;
/* per CPU now */
*max = buf_size / wdesc->cfgrom.hmq_width;
#endif
return
0
;
}
/**
* It opens a TRTL device
* @param[in] wdesc device descriptor
...
...
software/lib/libmockturtle.h
View file @
e39e0a31
...
...
@@ -174,9 +174,6 @@ extern int trtl_cpu_is_enable(struct trtl_dev *trtl, unsigned int index,
* @{
*/
extern
int
trtl_hmq_buffer_size_set
(
struct
trtl_hmq
*
hmq
,
uint32_t
size
);
extern
int
trtl_hmq_buffer_size_get
(
struct
trtl_hmq
*
hmq
,
uint32_t
*
size
);
extern
int
trtl_hmq_msg_max_get
(
struct
trtl_hmq
*
hmq
,
uint32_t
*
max
);
/* FIXME to be tested */
extern
int
trtl_hmq_filter_add
(
struct
trtl_dev
*
trtl
,
unsigned
int
idx_cpu
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment